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

package com.azure.resourcemanager.devtestlabs.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 Labs. */
public interface Labs {
    /**
     * List labs 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 the response of a list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Lab> list();

    /**
     * List labs in a subscription.
     *
     * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
     * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
     * @param top The maximum number of resources to return from the operation. Example: '$top=10'.
     * @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
     * @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 response of a list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Lab> list(String expand, String filter, Integer top, String orderby, Context context);

    /**
     * List labs in a resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @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 response of a list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Lab> listByResourceGroup(String resourceGroupName);

    /**
     * List labs in a resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
     * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
     * @param top The maximum number of resources to return from the operation. Example: '$top=10'.
     * @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
     * @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 response of a list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Lab> listByResourceGroup(
        String resourceGroupName, String expand, String filter, Integer top, String orderby, Context context);

    /**
     * Get lab.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
     * @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 lab along with {@link Response}.
     */
    Response<Lab> getByResourceGroupWithResponse(String resourceGroupName, String name, String expand, Context context);

    /**
     * Get lab.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @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 lab.
     */
    Lab getByResourceGroup(String resourceGroupName, String name);

    /**
     * Delete lab. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @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 deleteByResourceGroup(String resourceGroupName, String name);

    /**
     * Delete lab. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @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 delete(String resourceGroupName, String name, Context context);

    /**
     * Claim a random claimable virtual machine in the lab. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @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 claimAnyVm(String resourceGroupName, String name);

    /**
     * Claim a random claimable virtual machine in the lab. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @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 claimAnyVm(String resourceGroupName, String name, Context context);

    /**
     * Create virtual machines in a lab. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param labVirtualMachineCreationParameter Properties for creating a virtual machine.
     * @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 createEnvironment(
        String resourceGroupName, String name, LabVirtualMachineCreationParameter labVirtualMachineCreationParameter);

    /**
     * Create virtual machines in a lab. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param labVirtualMachineCreationParameter Properties for creating a virtual machine.
     * @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 createEnvironment(
        String resourceGroupName,
        String name,
        LabVirtualMachineCreationParameter labVirtualMachineCreationParameter,
        Context context);

    /**
     * Exports the lab resource usage into a storage account This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param exportResourceUsageParameters The parameters of the export 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 exportResourceUsage(
        String resourceGroupName, String name, ExportResourceUsageParameters exportResourceUsageParameters);

    /**
     * Exports the lab resource usage into a storage account This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param exportResourceUsageParameters The parameters of the export operation.
     * @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 exportResourceUsage(
        String resourceGroupName,
        String name,
        ExportResourceUsageParameters exportResourceUsageParameters,
        Context context);

    /**
     * Generate a URI for uploading custom disk images to a Lab.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param generateUploadUriParameter Properties for generating an upload URI.
     * @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 response body for generating an upload URI along with {@link Response}.
     */
    Response<GenerateUploadUriResponse> generateUploadUriWithResponse(
        String resourceGroupName, String name, GenerateUploadUriParameter generateUploadUriParameter, Context context);

    /**
     * Generate a URI for uploading custom disk images to a Lab.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param generateUploadUriParameter Properties for generating an upload URI.
     * @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 response body for generating an upload URI.
     */
    GenerateUploadUriResponse generateUploadUri(
        String resourceGroupName, String name, GenerateUploadUriParameter generateUploadUriParameter);

    /**
     * Import a virtual machine into a different lab. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param importLabVirtualMachineRequest This represents the payload required to import a virtual machine from a
     *     different lab into the current one.
     * @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 importVirtualMachine(
        String resourceGroupName, String name, ImportLabVirtualMachineRequest importLabVirtualMachineRequest);

    /**
     * Import a virtual machine into a different lab. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @param importLabVirtualMachineRequest This represents the payload required to import a virtual machine from a
     *     different lab into the current one.
     * @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 importVirtualMachine(
        String resourceGroupName,
        String name,
        ImportLabVirtualMachineRequest importLabVirtualMachineRequest,
        Context context);

    /**
     * List disk images available for custom image creation.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @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 response of a list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<LabVhd> listVhds(String resourceGroupName, String name);

    /**
     * List disk images available for custom image creation.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the lab.
     * @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 response of a list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<LabVhd> listVhds(String resourceGroupName, String name, Context context);

    /**
     * Get lab.
     *
     * @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 lab along with {@link Response}.
     */
    Lab getById(String id);

    /**
     * Get lab.
     *
     * @param id the resource ID.
     * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
     * @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 lab along with {@link Response}.
     */
    Response<Lab> getByIdWithResponse(String id, String expand, Context context);

    /**
     * Delete lab. This operation can take a while to complete.
     *
     * @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.
     */
    void deleteById(String id);

    /**
     * Delete lab. This operation can take a while to complete.
     *
     * @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.
     */
    void deleteByIdWithResponse(String id, Context context);

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