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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.devcenter.models.Capability;
import com.azure.resourcemanager.devcenter.models.Sku;
import com.azure.resourcemanager.devcenter.models.SkuTier;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The resource model definition representing SKU for DevCenter resources. */
@Fluent
public final class DevCenterSkuInner extends Sku {
    /*
     * The name of the resource type
     */
    @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY)
    private String resourceType;

    /*
     * SKU supported locations.
     */
    @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> locations;

    /*
     * Collection of name/value pairs to describe the SKU capabilities.
     */
    @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY)
    private List<Capability> capabilities;

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

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

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

    /**
     * Get the capabilities property: Collection of name/value pairs to describe the SKU capabilities.
     *
     * @return the capabilities value.
     */
    public List<Capability> capabilities() {
        return this.capabilities;
    }

    /** {@inheritDoc} */
    @Override
    public DevCenterSkuInner withName(String name) {
        super.withName(name);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DevCenterSkuInner withTier(SkuTier tier) {
        super.withTier(tier);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DevCenterSkuInner withSize(String size) {
        super.withSize(size);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DevCenterSkuInner withFamily(String family) {
        super.withFamily(family);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DevCenterSkuInner withCapacity(Integer capacity) {
        super.withCapacity(capacity);
        return this;
    }

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