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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The NetworkFabricSku resource definition. */
@Fluent
public final class NetworkFabricSkuInner extends ProxyResource {
    /*
     * Resource properties.
     */
    @JsonProperty(value = "properties", required = true)
    private NetworkFabricSkuProperties innerProperties = new NetworkFabricSkuProperties();

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: Resource properties.
     *
     * @return the innerProperties value.
     */
    private NetworkFabricSkuProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the type property: Type of Network Fabric Sku.
     *
     * @return the type value.
     */
    public String typePropertiesType() {
        return this.innerProperties() == null ? null : this.innerProperties().type();
    }

    /**
     * Get the maxComputeRacks property: Maximum number of compute racks available for this Network Fabric SKU.
     *
     * @return the maxComputeRacks value.
     */
    public Integer maxComputeRacks() {
        return this.innerProperties() == null ? null : this.innerProperties().maxComputeRacks();
    }

    /**
     * Set the maxComputeRacks property: Maximum number of compute racks available for this Network Fabric SKU.
     *
     * @param maxComputeRacks the maxComputeRacks value to set.
     * @return the NetworkFabricSkuInner object itself.
     */
    public NetworkFabricSkuInner withMaxComputeRacks(Integer maxComputeRacks) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricSkuProperties();
        }
        this.innerProperties().withMaxComputeRacks(maxComputeRacks);
        return this;
    }

    /**
     * Get the minSupportedVer property: Minimum supported version.
     *
     * @return the minSupportedVer value.
     */
    public String minSupportedVer() {
        return this.innerProperties() == null ? null : this.innerProperties().minSupportedVer();
    }

    /**
     * Get the maxSupportedVer property: Maximum supported version.
     *
     * @return the maxSupportedVer value.
     */
    public String maxSupportedVer() {
        return this.innerProperties() == null ? null : this.innerProperties().maxSupportedVer();
    }

    /**
     * Get the detailsUri property: The URI gives full details of sku.
     *
     * @return the detailsUri value.
     */
    public String detailsUri() {
        return this.innerProperties() == null ? null : this.innerProperties().detailsUri();
    }

    /**
     * Get the provisioningState property: Gets the provisioning state of the resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property innerProperties in model NetworkFabricSkuInner"));
        } else {
            innerProperties().validate();
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricSkuInner.class);
}
