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

package com.azure.resourcemanager.sqlvirtualmachine.models;

import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner;
import java.util.List;

/** An immutable client-side representation of AvailabilityGroupListener. */
public interface AvailabilityGroupListener {
    /**
     * 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: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the provisioningState property: Provisioning state to track the async operation status.
     *
     * @return the provisioningState value.
     */
    String provisioningState();

    /**
     * Gets the availabilityGroupName property: Name of the availability group.
     *
     * @return the availabilityGroupName value.
     */
    String availabilityGroupName();

    /**
     * Gets the loadBalancerConfigurations property: List of load balancer configurations for an availability group
     * listener.
     *
     * @return the loadBalancerConfigurations value.
     */
    List<LoadBalancerConfiguration> loadBalancerConfigurations();

    /**
     * Gets the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener.
     *
     * @return the multiSubnetIpConfigurations value.
     */
    List<MultiSubnetIpConfiguration> multiSubnetIpConfigurations();

    /**
     * Gets the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if it does not
     * exist.
     *
     * @return the createDefaultAvailabilityGroupIfNotExist value.
     */
    Boolean createDefaultAvailabilityGroupIfNotExist();

    /**
     * Gets the port property: Listener port.
     *
     * @return the port value.
     */
    Integer port();

    /**
     * Gets the availabilityGroupConfiguration property: Availability Group configuration.
     *
     * @return the availabilityGroupConfiguration value.
     */
    AgConfiguration availabilityGroupConfiguration();

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

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

    /** The entirety of the AvailabilityGroupListener definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The AvailabilityGroupListener definition stages. */
    interface DefinitionStages {
        /** The first stage of the AvailabilityGroupListener definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the AvailabilityGroupListener definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, sqlVirtualMachineGroupName.
             *
             * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value
             *     from the Azure Resource Manager API or the portal.
             * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
             * @return the next definition stage.
             */
            WithCreate withExistingSqlVirtualMachineGroup(String resourceGroupName, String sqlVirtualMachineGroupName);
        }
        /**
         * The stage of the AvailabilityGroupListener 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.WithAvailabilityGroupName,
                DefinitionStages.WithLoadBalancerConfigurations,
                DefinitionStages.WithMultiSubnetIpConfigurations,
                DefinitionStages.WithCreateDefaultAvailabilityGroupIfNotExist,
                DefinitionStages.WithPort,
                DefinitionStages.WithAvailabilityGroupConfiguration {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            AvailabilityGroupListener create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            AvailabilityGroupListener create(Context context);
        }
        /** The stage of the AvailabilityGroupListener definition allowing to specify availabilityGroupName. */
        interface WithAvailabilityGroupName {
            /**
             * Specifies the availabilityGroupName property: Name of the availability group..
             *
             * @param availabilityGroupName Name of the availability group.
             * @return the next definition stage.
             */
            WithCreate withAvailabilityGroupName(String availabilityGroupName);
        }
        /** The stage of the AvailabilityGroupListener definition allowing to specify loadBalancerConfigurations. */
        interface WithLoadBalancerConfigurations {
            /**
             * Specifies the loadBalancerConfigurations property: List of load balancer configurations for an
             * availability group listener..
             *
             * @param loadBalancerConfigurations List of load balancer configurations for an availability group
             *     listener.
             * @return the next definition stage.
             */
            WithCreate withLoadBalancerConfigurations(List<LoadBalancerConfiguration> loadBalancerConfigurations);
        }
        /** The stage of the AvailabilityGroupListener definition allowing to specify multiSubnetIpConfigurations. */
        interface WithMultiSubnetIpConfigurations {
            /**
             * Specifies the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG
             * listener..
             *
             * @param multiSubnetIpConfigurations List of multi subnet IP configurations for an AG listener.
             * @return the next definition stage.
             */
            WithCreate withMultiSubnetIpConfigurations(List<MultiSubnetIpConfiguration> multiSubnetIpConfigurations);
        }
        /**
         * The stage of the AvailabilityGroupListener definition allowing to specify
         * createDefaultAvailabilityGroupIfNotExist.
         */
        interface WithCreateDefaultAvailabilityGroupIfNotExist {
            /**
             * Specifies the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if
             * it does not exist..
             *
             * @param createDefaultAvailabilityGroupIfNotExist Create a default availability group if it does not exist.
             * @return the next definition stage.
             */
            WithCreate withCreateDefaultAvailabilityGroupIfNotExist(Boolean createDefaultAvailabilityGroupIfNotExist);
        }
        /** The stage of the AvailabilityGroupListener definition allowing to specify port. */
        interface WithPort {
            /**
             * Specifies the port property: Listener port..
             *
             * @param port Listener port.
             * @return the next definition stage.
             */
            WithCreate withPort(Integer port);
        }
        /** The stage of the AvailabilityGroupListener definition allowing to specify availabilityGroupConfiguration. */
        interface WithAvailabilityGroupConfiguration {
            /**
             * Specifies the availabilityGroupConfiguration property: Availability Group configuration..
             *
             * @param availabilityGroupConfiguration Availability Group configuration.
             * @return the next definition stage.
             */
            WithCreate withAvailabilityGroupConfiguration(AgConfiguration availabilityGroupConfiguration);
        }
    }
    /**
     * Begins update for the AvailabilityGroupListener resource.
     *
     * @return the stage of resource update.
     */
    AvailabilityGroupListener.Update update();

    /** The template for AvailabilityGroupListener update. */
    interface Update
        extends UpdateStages.WithAvailabilityGroupName,
            UpdateStages.WithLoadBalancerConfigurations,
            UpdateStages.WithMultiSubnetIpConfigurations,
            UpdateStages.WithCreateDefaultAvailabilityGroupIfNotExist,
            UpdateStages.WithPort,
            UpdateStages.WithAvailabilityGroupConfiguration {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        AvailabilityGroupListener apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        AvailabilityGroupListener apply(Context context);
    }
    /** The AvailabilityGroupListener update stages. */
    interface UpdateStages {
        /** The stage of the AvailabilityGroupListener update allowing to specify availabilityGroupName. */
        interface WithAvailabilityGroupName {
            /**
             * Specifies the availabilityGroupName property: Name of the availability group..
             *
             * @param availabilityGroupName Name of the availability group.
             * @return the next definition stage.
             */
            Update withAvailabilityGroupName(String availabilityGroupName);
        }
        /** The stage of the AvailabilityGroupListener update allowing to specify loadBalancerConfigurations. */
        interface WithLoadBalancerConfigurations {
            /**
             * Specifies the loadBalancerConfigurations property: List of load balancer configurations for an
             * availability group listener..
             *
             * @param loadBalancerConfigurations List of load balancer configurations for an availability group
             *     listener.
             * @return the next definition stage.
             */
            Update withLoadBalancerConfigurations(List<LoadBalancerConfiguration> loadBalancerConfigurations);
        }
        /** The stage of the AvailabilityGroupListener update allowing to specify multiSubnetIpConfigurations. */
        interface WithMultiSubnetIpConfigurations {
            /**
             * Specifies the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG
             * listener..
             *
             * @param multiSubnetIpConfigurations List of multi subnet IP configurations for an AG listener.
             * @return the next definition stage.
             */
            Update withMultiSubnetIpConfigurations(List<MultiSubnetIpConfiguration> multiSubnetIpConfigurations);
        }
        /**
         * The stage of the AvailabilityGroupListener update allowing to specify
         * createDefaultAvailabilityGroupIfNotExist.
         */
        interface WithCreateDefaultAvailabilityGroupIfNotExist {
            /**
             * Specifies the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if
             * it does not exist..
             *
             * @param createDefaultAvailabilityGroupIfNotExist Create a default availability group if it does not exist.
             * @return the next definition stage.
             */
            Update withCreateDefaultAvailabilityGroupIfNotExist(Boolean createDefaultAvailabilityGroupIfNotExist);
        }
        /** The stage of the AvailabilityGroupListener update allowing to specify port. */
        interface WithPort {
            /**
             * Specifies the port property: Listener port..
             *
             * @param port Listener port.
             * @return the next definition stage.
             */
            Update withPort(Integer port);
        }
        /** The stage of the AvailabilityGroupListener update allowing to specify availabilityGroupConfiguration. */
        interface WithAvailabilityGroupConfiguration {
            /**
             * Specifies the availabilityGroupConfiguration property: Availability Group configuration..
             *
             * @param availabilityGroupConfiguration Availability Group configuration.
             * @return the next definition stage.
             */
            Update withAvailabilityGroupConfiguration(AgConfiguration availabilityGroupConfiguration);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    AvailabilityGroupListener refresh();

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