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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.labservices.models.LabServicesSkuCapabilities;
import com.azure.resourcemanager.labservices.models.LabServicesSkuCapacity;
import com.azure.resourcemanager.labservices.models.LabServicesSkuCost;
import com.azure.resourcemanager.labservices.models.LabServicesSkuRestrictions;
import com.azure.resourcemanager.labservices.models.LabServicesSkuTier;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Azure Lab Services resource SKUs. */
@Fluent
public final class LabServicesSkuInner {
    /*
     * The lab services resource type.
     */
    @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY)
    private String resourceType;

    /*
     * The name of the SKU.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * The tier of the SKU.
     */
    @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY)
    private LabServicesSkuTier tier;

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

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

    /*
     * The scale out/in options of the SKU.
     */
    @JsonProperty(value = "capacity")
    private LabServicesSkuCapacity capacity;

    /*
     * The capabilities of the SKU.
     */
    @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY)
    private List<LabServicesSkuCapabilities> capabilities;

    /*
     * List of locations that are available for a size.
     */
    @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> locations;

    /*
     * Metadata for retrieving price info of a lab services SKUs.
     */
    @JsonProperty(value = "costs", access = JsonProperty.Access.WRITE_ONLY)
    private List<LabServicesSkuCost> costs;

    /*
     * Restrictions of a lab services SKUs.
     */
    @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY)
    private List<LabServicesSkuRestrictions> restrictions;

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

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

    /**
     * Get the tier property: The tier of the SKU.
     *
     * @return the tier value.
     */
    public LabServicesSkuTier tier() {
        return this.tier;
    }

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

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

    /**
     * Get the capacity property: The scale out/in options of the SKU.
     *
     * @return the capacity value.
     */
    public LabServicesSkuCapacity capacity() {
        return this.capacity;
    }

    /**
     * Set the capacity property: The scale out/in options of the SKU.
     *
     * @param capacity the capacity value to set.
     * @return the LabServicesSkuInner object itself.
     */
    public LabServicesSkuInner withCapacity(LabServicesSkuCapacity capacity) {
        this.capacity = capacity;
        return this;
    }

    /**
     * Get the capabilities property: The capabilities of the SKU.
     *
     * @return the capabilities value.
     */
    public List<LabServicesSkuCapabilities> capabilities() {
        return this.capabilities;
    }

    /**
     * Get the locations property: List of locations that are available for a size.
     *
     * @return the locations value.
     */
    public List<String> locations() {
        return this.locations;
    }

    /**
     * Get the costs property: Metadata for retrieving price info of a lab services SKUs.
     *
     * @return the costs value.
     */
    public List<LabServicesSkuCost> costs() {
        return this.costs;
    }

    /**
     * Get the restrictions property: Restrictions of a lab services SKUs.
     *
     * @return the restrictions value.
     */
    public List<LabServicesSkuRestrictions> restrictions() {
        return this.restrictions;
    }

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