// 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.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner;
import java.util.List;

/** An immutable client-side representation of InternalNetwork. */
public interface InternalNetwork {
    /**
     * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the disabledOnResources property: List of resources the InternalNetwork is disabled on. Can be either entire
     * NetworkFabric or NetworkRack.
     *
     * @return the disabledOnResources value.
     */
    List<String> disabledOnResources();

    /**
     * Gets the administrativeState property: Administrative state of the InternalNetwork. Example: Enabled | Disabled.
     *
     * @return the administrativeState value.
     */
    EnabledDisabledState administrativeState();

    /**
     * Gets the bgpDisabledOnResources property: List of resources the BGP is disabled on. Can be either entire
     * NetworkFabric or NetworkRack.
     *
     * @return the bgpDisabledOnResources value.
     */
    List<String> bgpDisabledOnResources();

    /**
     * Gets the bfdDisabledOnResources property: List of resources the BFD for BGP is disabled on. Can be either entire
     * NetworkFabric or NetworkRack.
     *
     * @return the bfdDisabledOnResources value.
     */
    List<String> bfdDisabledOnResources();

    /**
     * Gets the bfdForStaticRoutesDisabledOnResources property: List of resources the BFD of StaticRoutes is disabled
     * on. Can be either entire NetworkFabric or NetworkRack.
     *
     * @return the bfdForStaticRoutesDisabledOnResources value.
     */
    List<String> bfdForStaticRoutesDisabledOnResources();

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

    /**
     * Gets the vlanId property: Vlan identifier. Example: 1001.
     *
     * @return the vlanId value.
     */
    int vlanId();

    /**
     * Gets the mtu property: Maximum transmission unit. Default value is 1500.
     *
     * @return the mtu value.
     */
    Integer mtu();

    /**
     * Gets the connectedIPv4Subnets property: List with object connected IPv4 Subnets.
     *
     * @return the connectedIPv4Subnets value.
     */
    List<ConnectedSubnet> connectedIPv4Subnets();

    /**
     * Gets the connectedIPv6Subnets property: List with object connected IPv6 Subnets.
     *
     * @return the connectedIPv6Subnets value.
     */
    List<ConnectedSubnet> connectedIPv6Subnets();

    /**
     * Gets the staticRouteConfiguration property: Static Route Configuration properties.
     *
     * @return the staticRouteConfiguration value.
     */
    StaticRouteConfiguration staticRouteConfiguration();

    /**
     * Gets the bgpConfiguration property: BGP configuration properties.
     *
     * @return the bgpConfiguration value.
     */
    BgpConfiguration bgpConfiguration();

    /**
     * Gets the importRoutePolicyId property: ARM resource ID of importRoutePolicy.
     *
     * @return the importRoutePolicyId value.
     */
    String importRoutePolicyId();

    /**
     * Gets the exportRoutePolicyId property: ARM resource ID of importRoutePolicy.
     *
     * @return the exportRoutePolicyId value.
     */
    String exportRoutePolicyId();

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

    /**
     * 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.InternalNetworkInner object.
     *
     * @return the inner object.
     */
    InternalNetworkInner innerModel();

    /** The entirety of the InternalNetwork definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithParentResource,
            DefinitionStages.WithVlanId,
            DefinitionStages.WithCreate {
    }
    /** The InternalNetwork definition stages. */
    interface DefinitionStages {
        /** The first stage of the InternalNetwork definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the InternalNetwork definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, l3IsolationDomainName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param l3IsolationDomainName Name of the L3IsolationDomain.
             * @return the next definition stage.
             */
            WithVlanId withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName);
        }
        /** The stage of the InternalNetwork definition allowing to specify vlanId. */
        interface WithVlanId {
            /**
             * Specifies the vlanId property: Vlan identifier. Example: 1001..
             *
             * @param vlanId Vlan identifier. Example: 1001.
             * @return the next definition stage.
             */
            WithCreate withVlanId(int vlanId);
        }
        /**
         * The stage of the InternalNetwork 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.WithMtu,
                DefinitionStages.WithConnectedIPv4Subnets,
                DefinitionStages.WithConnectedIPv6Subnets,
                DefinitionStages.WithStaticRouteConfiguration,
                DefinitionStages.WithBgpConfiguration,
                DefinitionStages.WithImportRoutePolicyId,
                DefinitionStages.WithExportRoutePolicyId,
                DefinitionStages.WithAnnotation {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            InternalNetwork create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            InternalNetwork create(Context context);
        }
        /** The stage of the InternalNetwork definition allowing to specify mtu. */
        interface WithMtu {
            /**
             * Specifies the mtu property: Maximum transmission unit. Default value is 1500..
             *
             * @param mtu Maximum transmission unit. Default value is 1500.
             * @return the next definition stage.
             */
            WithCreate withMtu(Integer mtu);
        }
        /** The stage of the InternalNetwork definition allowing to specify connectedIPv4Subnets. */
        interface WithConnectedIPv4Subnets {
            /**
             * Specifies the connectedIPv4Subnets property: List with object connected IPv4 Subnets..
             *
             * @param connectedIPv4Subnets List with object connected IPv4 Subnets.
             * @return the next definition stage.
             */
            WithCreate withConnectedIPv4Subnets(List<ConnectedSubnet> connectedIPv4Subnets);
        }
        /** The stage of the InternalNetwork definition allowing to specify connectedIPv6Subnets. */
        interface WithConnectedIPv6Subnets {
            /**
             * Specifies the connectedIPv6Subnets property: List with object connected IPv6 Subnets..
             *
             * @param connectedIPv6Subnets List with object connected IPv6 Subnets.
             * @return the next definition stage.
             */
            WithCreate withConnectedIPv6Subnets(List<ConnectedSubnet> connectedIPv6Subnets);
        }
        /** The stage of the InternalNetwork definition allowing to specify staticRouteConfiguration. */
        interface WithStaticRouteConfiguration {
            /**
             * Specifies the staticRouteConfiguration property: Static Route Configuration properties..
             *
             * @param staticRouteConfiguration Static Route Configuration properties.
             * @return the next definition stage.
             */
            WithCreate withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration);
        }
        /** The stage of the InternalNetwork definition allowing to specify bgpConfiguration. */
        interface WithBgpConfiguration {
            /**
             * Specifies the bgpConfiguration property: BGP configuration properties.
             *
             * @param bgpConfiguration BGP configuration properties.
             * @return the next definition stage.
             */
            WithCreate withBgpConfiguration(BgpConfiguration bgpConfiguration);
        }
        /** The stage of the InternalNetwork definition allowing to specify importRoutePolicyId. */
        interface WithImportRoutePolicyId {
            /**
             * Specifies the importRoutePolicyId property: ARM resource ID of importRoutePolicy..
             *
             * @param importRoutePolicyId ARM resource ID of importRoutePolicy.
             * @return the next definition stage.
             */
            WithCreate withImportRoutePolicyId(String importRoutePolicyId);
        }
        /** The stage of the InternalNetwork definition allowing to specify exportRoutePolicyId. */
        interface WithExportRoutePolicyId {
            /**
             * Specifies the exportRoutePolicyId property: ARM resource ID of importRoutePolicy..
             *
             * @param exportRoutePolicyId ARM resource ID of importRoutePolicy.
             * @return the next definition stage.
             */
            WithCreate withExportRoutePolicyId(String exportRoutePolicyId);
        }
        /** The stage of the InternalNetwork 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 InternalNetwork resource.
     *
     * @return the stage of resource update.
     */
    InternalNetwork.Update update();

    /** The template for InternalNetwork update. */
    interface Update
        extends UpdateStages.WithMtu,
            UpdateStages.WithConnectedIPv4Subnets,
            UpdateStages.WithConnectedIPv6Subnets,
            UpdateStages.WithStaticRouteConfiguration,
            UpdateStages.WithBgpConfiguration,
            UpdateStages.WithImportRoutePolicyId,
            UpdateStages.WithExportRoutePolicyId,
            UpdateStages.WithAnnotation {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        InternalNetwork apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        InternalNetwork apply(Context context);
    }
    /** The InternalNetwork update stages. */
    interface UpdateStages {
        /** The stage of the InternalNetwork update allowing to specify mtu. */
        interface WithMtu {
            /**
             * Specifies the mtu property: Maximum transmission unit. Default value is 1500..
             *
             * @param mtu Maximum transmission unit. Default value is 1500.
             * @return the next definition stage.
             */
            Update withMtu(Integer mtu);
        }
        /** The stage of the InternalNetwork update allowing to specify connectedIPv4Subnets. */
        interface WithConnectedIPv4Subnets {
            /**
             * Specifies the connectedIPv4Subnets property: List with object connected IPv4 Subnets..
             *
             * @param connectedIPv4Subnets List with object connected IPv4 Subnets.
             * @return the next definition stage.
             */
            Update withConnectedIPv4Subnets(List<ConnectedSubnet> connectedIPv4Subnets);
        }
        /** The stage of the InternalNetwork update allowing to specify connectedIPv6Subnets. */
        interface WithConnectedIPv6Subnets {
            /**
             * Specifies the connectedIPv6Subnets property: List with object connected IPv6 Subnets..
             *
             * @param connectedIPv6Subnets List with object connected IPv6 Subnets.
             * @return the next definition stage.
             */
            Update withConnectedIPv6Subnets(List<ConnectedSubnet> connectedIPv6Subnets);
        }
        /** The stage of the InternalNetwork update allowing to specify staticRouteConfiguration. */
        interface WithStaticRouteConfiguration {
            /**
             * Specifies the staticRouteConfiguration property: Static Route Configuration properties..
             *
             * @param staticRouteConfiguration Static Route Configuration properties.
             * @return the next definition stage.
             */
            Update withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration);
        }
        /** The stage of the InternalNetwork update allowing to specify bgpConfiguration. */
        interface WithBgpConfiguration {
            /**
             * Specifies the bgpConfiguration property: BGP configuration properties.
             *
             * @param bgpConfiguration BGP configuration properties.
             * @return the next definition stage.
             */
            Update withBgpConfiguration(BgpConfiguration bgpConfiguration);
        }
        /** The stage of the InternalNetwork update allowing to specify importRoutePolicyId. */
        interface WithImportRoutePolicyId {
            /**
             * Specifies the importRoutePolicyId property: ARM resource ID of importRoutePolicy..
             *
             * @param importRoutePolicyId ARM resource ID of importRoutePolicy.
             * @return the next definition stage.
             */
            Update withImportRoutePolicyId(String importRoutePolicyId);
        }
        /** The stage of the InternalNetwork update allowing to specify exportRoutePolicyId. */
        interface WithExportRoutePolicyId {
            /**
             * Specifies the exportRoutePolicyId property: ARM resource ID of importRoutePolicy..
             *
             * @param exportRoutePolicyId ARM resource ID of importRoutePolicy.
             * @return the next definition stage.
             */
            Update withExportRoutePolicyId(String exportRoutePolicyId);
        }
        /** The stage of the InternalNetwork 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.
     */
    InternalNetwork refresh();

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

    /**
     * Executes the operation to the underlying resources.
     *
     * <p>Update Administrative state of InternalNetworks on resources referred by their resource ids.
     *
     * @param body Request payload.
     * @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 updateAdministrativeState(UpdateAdministrativeState body);

    /**
     * Executes the operation to the underlying resources.
     *
     * <p>Update Administrative state of InternalNetworks on resources referred by their resource ids.
     *
     * @param body Request payload.
     * @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 updateAdministrativeState(UpdateAdministrativeState body, Context context);

    /**
     * Executes the operation to the underlying resources for updating BGP state on edge devices.
     *
     * <p>Update BGP state for internalNetwork. Allowed only on edge devices.
     *
     * @param body Request payload.
     * @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 updateBgpAdministrativeState(UpdateAdministrativeState body);

    /**
     * Executes the operation to the underlying resources for updating BGP state on edge devices.
     *
     * <p>Update BGP state for internalNetwork. Allowed only on edge devices.
     *
     * @param body Request payload.
     * @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 updateBgpAdministrativeState(UpdateAdministrativeState body, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Update BfdForBgp for internalNetwork.
     *
     * @param body Request payload.
     * @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 updateBfdForBgpAdministrativeState(UpdateAdministrativeState body);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Update BfdForBgp for internalNetwork.
     *
     * @param body Request payload.
     * @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 updateBfdForBgpAdministrativeState(UpdateAdministrativeState body, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>clearIpv6Neighbors for internalNetwork.
     *
     * @param body Request payload.
     * @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 clearIpv6Neighbors(EnableDisableOnResources body);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>clearIpv6Neighbors for internalNetwork.
     *
     * @param body Request payload.
     * @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 clearIpv6Neighbors(EnableDisableOnResources body, Context context);

    /**
     * Executes clearArpEntries operation to the underlying resources.
     *
     * <p>clearArpEntries for internalNetwork.
     *
     * @param body Request payload.
     * @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 clearArpEntries(EnableDisableOnResources body);

    /**
     * Executes clearArpEntries operation to the underlying resources.
     *
     * <p>clearArpEntries for internalNetwork.
     *
     * @param body Request payload.
     * @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 clearArpEntries(EnableDisableOnResources body, Context context);

    /**
     * Executes update BfdForStaticRoutes operation to the underlying resources.
     *
     * <p>Update BfdForStaticRoutes for internalNetwork.
     *
     * @param body Request payload.
     * @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 updateBfdForStaticRouteAdministrativeState(UpdateAdministrativeState body);

    /**
     * Executes update BfdForStaticRoutes operation to the underlying resources.
     *
     * <p>Update BfdForStaticRoutes for internalNetwork.
     *
     * @param body Request payload.
     * @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 updateBfdForStaticRouteAdministrativeState(UpdateAdministrativeState body, Context context);
}
