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

package com.azure.resourcemanager.workloads.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of SapVirtualInstances. */
public interface SapVirtualInstances {
    /**
     * Gets a Virtual Instance for SAP solutions resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource.
     * @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.
     * @return a Virtual Instance for SAP solutions resource along with {@link Response}.
     */
    Response<SapVirtualInstance> getByResourceGroupWithResponse(
        String resourceGroupName, String sapVirtualInstanceName, Context context);

    /**
     * Gets a Virtual Instance for SAP solutions resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource.
     * @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.
     * @return a Virtual Instance for SAP solutions resource.
     */
    SapVirtualInstance getByResourceGroup(String resourceGroupName, String sapVirtualInstanceName);

    /**
     * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central
     * Services Instance, Application Server Instances and Database Instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource.
     * @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.
     * @return the current status of an async operation.
     */
    OperationStatusResult deleteByResourceGroup(String resourceGroupName, String sapVirtualInstanceName);

    /**
     * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central
     * Services Instance, Application Server Instances and Database Instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource.
     * @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.
     * @return the current status of an async operation.
     */
    OperationStatusResult delete(String resourceGroupName, String sapVirtualInstanceName, Context context);

    /**
     * Gets all Virtual Instances for SAP solutions resources in a Resource Group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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.
     * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<SapVirtualInstance> listByResourceGroup(String resourceGroupName);

    /**
     * Gets all Virtual Instances for SAP solutions resources in a Resource Group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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.
     * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<SapVirtualInstance> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Gets all Virtual Instances for SAP solutions resources in a Subscription.
     *
     * @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.
     * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<SapVirtualInstance> list();

    /**
     * Gets all Virtual Instances for SAP solutions resources in a Subscription.
     *
     * @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.
     * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<SapVirtualInstance> list(Context context);

    /**
     * Starts the SAP application, that is the Central Services instance and Application server instances.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource.
     * @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.
     * @return the current status of an async operation.
     */
    OperationStatusResult start(String resourceGroupName, String sapVirtualInstanceName);

    /**
     * Starts the SAP application, that is the Central Services instance and Application server instances.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource.
     * @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.
     * @return the current status of an async operation.
     */
    OperationStatusResult start(String resourceGroupName, String sapVirtualInstanceName, Context context);

    /**
     * Stops the SAP Application, that is the Application server instances and Central Services instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource.
     * @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.
     * @return the current status of an async operation.
     */
    OperationStatusResult stop(String resourceGroupName, String sapVirtualInstanceName);

    /**
     * Stops the SAP Application, that is the Application server instances and Central Services instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource.
     * @param body The Virtual Instance for SAP solutions resource stop request body.
     * @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.
     * @return the current status of an async operation.
     */
    OperationStatusResult stop(
        String resourceGroupName, String sapVirtualInstanceName, StopRequest body, Context context);

    /**
     * Gets a Virtual Instance for SAP solutions resource.
     *
     * @param id the resource ID.
     * @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.
     * @return a Virtual Instance for SAP solutions resource along with {@link Response}.
     */
    SapVirtualInstance getById(String id);

    /**
     * Gets a Virtual Instance for SAP solutions resource.
     *
     * @param id the resource ID.
     * @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.
     * @return a Virtual Instance for SAP solutions resource along with {@link Response}.
     */
    Response<SapVirtualInstance> getByIdWithResponse(String id, Context context);

    /**
     * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central
     * Services Instance, Application Server Instances and Database Instance.
     *
     * @param id the resource ID.
     * @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.
     * @return the current status of an async operation.
     */
    OperationStatusResult deleteById(String id);

    /**
     * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central
     * Services Instance, Application Server Instances and Database Instance.
     *
     * @param id the resource ID.
     * @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.
     * @return the current status of an async operation.
     */
    OperationStatusResult deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new SapVirtualInstance resource.
     *
     * @param name resource name.
     * @return the first stage of the new SapVirtualInstance definition.
     */
    SapVirtualInstance.DefinitionStages.Blank define(String name);
}
