// 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.models;

import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of NetworkFabric. */
public interface NetworkFabric {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the location property: The geo-location where the resource lives.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the tags property: Resource tags.
     *
     * @return the tags value.
     */
    Map<String, String> tags();

    /**
     * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the networkFabricSku property: Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the
     * user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines
     * whether it is a single / multi rack Network Fabric.
     *
     * @return the networkFabricSku value.
     */
    String networkFabricSku();

    /**
     * Gets the rackCount property: Number of racks associated to Network Fabric.Possible values are from 2-8.
     *
     * @return the rackCount value.
     */
    int rackCount();

    /**
     * Gets the serverCountPerRack property: Number of servers.Possible values are from 1-16.
     *
     * @return the serverCountPerRack value.
     */
    int serverCountPerRack();

    /**
     * Gets the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19.
     *
     * @return the ipv4Prefix value.
     */
    String ipv4Prefix();

    /**
     * Gets the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59.
     *
     * @return the ipv6Prefix value.
     */
    String ipv6Prefix();

    /**
     * Gets the routerId property: Router Id of CE to be used for MP-BGP between PE and CE.
     *
     * @return the routerId value.
     */
    String routerId();

    /**
     * Gets the fabricAsn property: ASN of CE devices for CE/PE connectivity.
     *
     * @return the fabricAsn value.
     */
    int fabricAsn();

    /**
     * Gets the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric
     * belongs.
     *
     * @return the networkFabricControllerId value.
     */
    String networkFabricControllerId();

    /**
     * Gets the terminalServerConfiguration property: Network and credentials configuration currently applied to
     * terminal server.
     *
     * @return the terminalServerConfiguration value.
     */
    TerminalServerConfiguration terminalServerConfiguration();

    /**
     * Gets the managementNetworkConfiguration property: Configuration to be used to setup the management network.
     *
     * @return the managementNetworkConfiguration value.
     */
    ManagementNetworkConfiguration managementNetworkConfiguration();

    /**
     * Gets the operationalState property: Gets the operational state of the resource.
     *
     * @return the operationalState value.
     */
    NetworkFabricOperationalState operationalState();

    /**
     * Gets the provisioningState property: Gets the provisioning state of the resource.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the racks property: List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed
     * depends on the Network Fabric SKU.
     *
     * @return the racks value.
     */
    List<String> racks();

    /**
     * Gets the l2IsolationDomains property: List of L2IsolationDomain resource IDs under the Network Fabric.
     *
     * @return the l2IsolationDomains value.
     */
    List<String> l2IsolationDomains();

    /**
     * Gets the l3IsolationDomains property: List of L3IsolationDomain resource IDs under the Network Fabric.
     *
     * @return the l3IsolationDomains value.
     */
    List<String> l3IsolationDomains();

    /**
     * Gets the annotation property: Switch configuration description.
     *
     * @return the annotation value.
     */
    String annotation();

    /**
     * Gets the region of the resource.
     *
     * @return the region of the resource.
     */
    Region region();

    /**
     * Gets the name of the resource region.
     *
     * @return the name of the resource region.
     */
    String regionName();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner object.
     *
     * @return the inner object.
     */
    NetworkFabricInner innerModel();

    /** The entirety of the NetworkFabric definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithCreate {
    }
    /** The NetworkFabric definition stages. */
    interface DefinitionStages {
        /** The first stage of the NetworkFabric definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the NetworkFabric definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(String location);
        }
        /** The stage of the NetworkFabric definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @return the next definition stage.
             */
            WithCreate withExistingResourceGroup(String resourceGroupName);
        }
        /**
         * The stage of the NetworkFabric definition which contains all the minimum required properties for the resource
         * to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithTags,
                DefinitionStages.WithNetworkFabricSku,
                DefinitionStages.WithRackCount,
                DefinitionStages.WithServerCountPerRack,
                DefinitionStages.WithIpv4Prefix,
                DefinitionStages.WithIpv6Prefix,
                DefinitionStages.WithFabricAsn,
                DefinitionStages.WithNetworkFabricControllerId,
                DefinitionStages.WithTerminalServerConfiguration,
                DefinitionStages.WithManagementNetworkConfiguration,
                DefinitionStages.WithAnnotation {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            NetworkFabric create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            NetworkFabric create(Context context);
        }
        /** The stage of the NetworkFabric definition allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            WithCreate withTags(Map<String, String> tags);
        }
        /** The stage of the NetworkFabric definition allowing to specify networkFabricSku. */
        interface WithNetworkFabricSku {
            /**
             * Specifies the networkFabricSku property: Supported Network Fabric SKU.Example: Compute / Aggregate racks.
             * Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU
             * determines whether it is a single / multi rack Network Fabric..
             *
             * @param networkFabricSku Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user
             *     chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines
             *     whether it is a single / multi rack Network Fabric.
             * @return the next definition stage.
             */
            WithCreate withNetworkFabricSku(String networkFabricSku);
        }
        /** The stage of the NetworkFabric definition allowing to specify rackCount. */
        interface WithRackCount {
            /**
             * Specifies the rackCount property: Number of racks associated to Network Fabric.Possible values are from
             * 2-8..
             *
             * @param rackCount Number of racks associated to Network Fabric.Possible values are from 2-8.
             * @return the next definition stage.
             */
            WithCreate withRackCount(int rackCount);
        }
        /** The stage of the NetworkFabric definition allowing to specify serverCountPerRack. */
        interface WithServerCountPerRack {
            /**
             * Specifies the serverCountPerRack property: Number of servers.Possible values are from 1-16..
             *
             * @param serverCountPerRack Number of servers.Possible values are from 1-16.
             * @return the next definition stage.
             */
            WithCreate withServerCountPerRack(int serverCountPerRack);
        }
        /** The stage of the NetworkFabric definition allowing to specify ipv4Prefix. */
        interface WithIpv4Prefix {
            /**
             * Specifies the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19..
             *
             * @param ipv4Prefix IPv4Prefix for Management Network. Example: 10.1.0.0/19.
             * @return the next definition stage.
             */
            WithCreate withIpv4Prefix(String ipv4Prefix);
        }
        /** The stage of the NetworkFabric definition allowing to specify ipv6Prefix. */
        interface WithIpv6Prefix {
            /**
             * Specifies the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59..
             *
             * @param ipv6Prefix IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59.
             * @return the next definition stage.
             */
            WithCreate withIpv6Prefix(String ipv6Prefix);
        }
        /** The stage of the NetworkFabric definition allowing to specify fabricAsn. */
        interface WithFabricAsn {
            /**
             * Specifies the fabricAsn property: ASN of CE devices for CE/PE connectivity..
             *
             * @param fabricAsn ASN of CE devices for CE/PE connectivity.
             * @return the next definition stage.
             */
            WithCreate withFabricAsn(int fabricAsn);
        }
        /** The stage of the NetworkFabric definition allowing to specify networkFabricControllerId. */
        interface WithNetworkFabricControllerId {
            /**
             * Specifies the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the
             * NetworkFabric belongs..
             *
             * @param networkFabricControllerId Azure resource ID for the NetworkFabricController the NetworkFabric
             *     belongs.
             * @return the next definition stage.
             */
            WithCreate withNetworkFabricControllerId(String networkFabricControllerId);
        }
        /** The stage of the NetworkFabric definition allowing to specify terminalServerConfiguration. */
        interface WithTerminalServerConfiguration {
            /**
             * Specifies the terminalServerConfiguration property: Network and credentials configuration currently
             * applied to terminal server..
             *
             * @param terminalServerConfiguration Network and credentials configuration currently applied to terminal
             *     server.
             * @return the next definition stage.
             */
            WithCreate withTerminalServerConfiguration(TerminalServerConfiguration terminalServerConfiguration);
        }
        /** The stage of the NetworkFabric definition allowing to specify managementNetworkConfiguration. */
        interface WithManagementNetworkConfiguration {
            /**
             * Specifies the managementNetworkConfiguration property: Configuration to be used to setup the management
             * network..
             *
             * @param managementNetworkConfiguration Configuration to be used to setup the management network.
             * @return the next definition stage.
             */
            WithCreate withManagementNetworkConfiguration(
                ManagementNetworkConfiguration managementNetworkConfiguration);
        }
        /** The stage of the NetworkFabric definition allowing to specify annotation. */
        interface WithAnnotation {
            /**
             * Specifies the annotation property: Switch configuration description..
             *
             * @param annotation Switch configuration description.
             * @return the next definition stage.
             */
            WithCreate withAnnotation(String annotation);
        }
    }
    /**
     * Begins update for the NetworkFabric resource.
     *
     * @return the stage of resource update.
     */
    NetworkFabric.Update update();

    /** The template for NetworkFabric update. */
    interface Update
        extends UpdateStages.WithTags, UpdateStages.WithTerminalServerConfiguration, UpdateStages.WithAnnotation {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        NetworkFabric apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        NetworkFabric apply(Context context);
    }
    /** The NetworkFabric update stages. */
    interface UpdateStages {
        /** The stage of the NetworkFabric update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Azure resource tags that will replace the existing ones..
             *
             * @param tags Azure resource tags that will replace the existing ones.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the NetworkFabric update allowing to specify terminalServerConfiguration. */
        interface WithTerminalServerConfiguration {
            /**
             * Specifies the terminalServerConfiguration property: Network and credentials configuration already applied
             * to terminal server..
             *
             * @param terminalServerConfiguration Network and credentials configuration already applied to terminal
             *     server.
             * @return the next definition stage.
             */
            Update withTerminalServerConfiguration(TerminalServerPatchableProperties terminalServerConfiguration);
        }
        /** The stage of the NetworkFabric update allowing to specify annotation. */
        interface WithAnnotation {
            /**
             * Specifies the annotation property: Switch configuration description..
             *
             * @param annotation Switch configuration description.
             * @return the next definition stage.
             */
            Update withAnnotation(String annotation);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    NetworkFabric refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    NetworkFabric refresh(Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Provisions the underlying resources in the given Network Fabric instance.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void provision();

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Provisions the underlying resources in the given Network Fabric instance.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void provision(Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Deprovisions the underlying resources in the given Network Fabric instance.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deprovision();

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Deprovisions the underlying resources in the given Network Fabric instance.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deprovision(Context context);
}
