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

package com.azure.resourcemanager.synapse.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleInfoInner;

/** An immutable client-side representation of IpFirewallRuleInfo. */
public interface IpFirewallRuleInfo {
    /**
     * 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 endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must be greater
     * than or equal to startIpAddress.
     *
     * @return the endIpAddress value.
     */
    String endIpAddress();

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

    /**
     * Gets the startIpAddress property: The start IP address of the firewall rule. Must be IPv4 format.
     *
     * @return the startIpAddress value.
     */
    String startIpAddress();

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

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

    /** The entirety of the IpFirewallRuleInfo definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The IpFirewallRuleInfo definition stages. */
    interface DefinitionStages {
        /** The first stage of the IpFirewallRuleInfo definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the IpFirewallRuleInfo definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, workspaceName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param workspaceName The name of the workspace.
             * @return the next definition stage.
             */
            WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName);
        }
        /**
         * The stage of the IpFirewallRuleInfo 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.WithEndIpAddress, DefinitionStages.WithStartIpAddress {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            IpFirewallRuleInfo create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            IpFirewallRuleInfo create(Context context);
        }
        /** The stage of the IpFirewallRuleInfo definition allowing to specify endIpAddress. */
        interface WithEndIpAddress {
            /**
             * Specifies the endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must
             * be greater than or equal to startIpAddress.
             *
             * @param endIpAddress The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or
             *     equal to startIpAddress.
             * @return the next definition stage.
             */
            WithCreate withEndIpAddress(String endIpAddress);
        }
        /** The stage of the IpFirewallRuleInfo definition allowing to specify startIpAddress. */
        interface WithStartIpAddress {
            /**
             * Specifies the startIpAddress property: The start IP address of the firewall rule. Must be IPv4 format.
             *
             * @param startIpAddress The start IP address of the firewall rule. Must be IPv4 format.
             * @return the next definition stage.
             */
            WithCreate withStartIpAddress(String startIpAddress);
        }
    }
    /**
     * Begins update for the IpFirewallRuleInfo resource.
     *
     * @return the stage of resource update.
     */
    IpFirewallRuleInfo.Update update();

    /** The template for IpFirewallRuleInfo update. */
    interface Update extends UpdateStages.WithEndIpAddress, UpdateStages.WithStartIpAddress {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        IpFirewallRuleInfo apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        IpFirewallRuleInfo apply(Context context);
    }
    /** The IpFirewallRuleInfo update stages. */
    interface UpdateStages {
        /** The stage of the IpFirewallRuleInfo update allowing to specify endIpAddress. */
        interface WithEndIpAddress {
            /**
             * Specifies the endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must
             * be greater than or equal to startIpAddress.
             *
             * @param endIpAddress The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or
             *     equal to startIpAddress.
             * @return the next definition stage.
             */
            Update withEndIpAddress(String endIpAddress);
        }
        /** The stage of the IpFirewallRuleInfo update allowing to specify startIpAddress. */
        interface WithStartIpAddress {
            /**
             * Specifies the startIpAddress property: The start IP address of the firewall rule. Must be IPv4 format.
             *
             * @param startIpAddress The start IP address of the firewall rule. Must be IPv4 format.
             * @return the next definition stage.
             */
            Update withStartIpAddress(String startIpAddress);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    IpFirewallRuleInfo refresh();

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