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

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

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.databoxedge.models.SkuCost;
import com.azure.resourcemanager.databoxedge.models.SkuLocationInfo;
import com.azure.resourcemanager.databoxedge.models.SkuName;
import com.azure.resourcemanager.databoxedge.models.SkuRestriction;
import com.azure.resourcemanager.databoxedge.models.SkuTier;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** SkuInformation object. */
@Immutable
public final class ResourceTypeSkuInner {
    /*
     * The type of the resource
     */
    @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY)
    private String resourceType;

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

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

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

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

    /*
     * Availability of the SKU for the region
     */
    @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> locations;

    /*
     * The API versions in which SKU is available
     */
    @JsonProperty(value = "apiVersions", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> apiVersions;

    /*
     * Availability of the SKU for the location/zone
     */
    @JsonProperty(value = "locationInfo", access = JsonProperty.Access.WRITE_ONLY)
    private List<SkuLocationInfo> locationInfo;

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

    /*
     * Restrictions of the SKU availability.
     */
    @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY)
    private List<SkuRestriction> restrictions;

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

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

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

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

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

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

    /**
     * Get the locations property: Availability of the SKU for the region.
     *
     * @return the locations value.
     */
    public List<String> locations() {
        return this.locations;
    }

    /**
     * Get the apiVersions property: The API versions in which SKU is available.
     *
     * @return the apiVersions value.
     */
    public List<String> apiVersions() {
        return this.apiVersions;
    }

    /**
     * Get the locationInfo property: Availability of the SKU for the location/zone.
     *
     * @return the locationInfo value.
     */
    public List<SkuLocationInfo> locationInfo() {
        return this.locationInfo;
    }

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

    /**
     * Get the restrictions property: Restrictions of the SKU availability.
     *
     * @return the restrictions value.
     */
    public List<SkuRestriction> restrictions() {
        return this.restrictions;
    }

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