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

package com.azure.resourcemanager.networkcloud.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 Consoles. */
public interface Consoles {
    /**
     * List consoles of the virtual machine.
     *
     * <p>Get a list of consoles for the provided virtual machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param virtualMachineName The name of the 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.
     * @return a list of consoles for the provided virtual machine as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Console> listByVirtualMachine(String resourceGroupName, String virtualMachineName);

    /**
     * List consoles of the virtual machine.
     *
     * <p>Get a list of consoles for the provided virtual machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param virtualMachineName The name of the 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.
     * @return a list of consoles for the provided virtual machine as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Console> listByVirtualMachine(String resourceGroupName, String virtualMachineName, Context context);

    /**
     * Retrieve the virtual machine console.
     *
     * <p>Get properties of the provided virtual machine console.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param virtualMachineName The name of the virtual machine.
     * @param consoleName The name of the virtual machine console.
     * @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 properties of the provided virtual machine console along with {@link Response}.
     */
    Response<Console> getWithResponse(
        String resourceGroupName, String virtualMachineName, String consoleName, Context context);

    /**
     * Retrieve the virtual machine console.
     *
     * <p>Get properties of the provided virtual machine console.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param virtualMachineName The name of the virtual machine.
     * @param consoleName The name of the virtual machine console.
     * @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 properties of the provided virtual machine console.
     */
    Console get(String resourceGroupName, String virtualMachineName, String consoleName);

    /**
     * Delete the virtual machine console.
     *
     * <p>Delete the provided virtual machine console.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param virtualMachineName The name of the virtual machine.
     * @param consoleName The name of the virtual machine console.
     * @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 virtualMachineName, String consoleName);

    /**
     * Delete the virtual machine console.
     *
     * <p>Delete the provided virtual machine console.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param virtualMachineName The name of the virtual machine.
     * @param consoleName The name of the virtual machine console.
     * @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 virtualMachineName, String consoleName, Context context);

    /**
     * Retrieve the virtual machine console.
     *
     * <p>Get properties of the provided virtual machine console.
     *
     * @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 properties of the provided virtual machine console along with {@link Response}.
     */
    Console getById(String id);

    /**
     * Retrieve the virtual machine console.
     *
     * <p>Get properties of the provided virtual machine console.
     *
     * @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 properties of the provided virtual machine console along with {@link Response}.
     */
    Response<Console> getByIdWithResponse(String id, Context context);

    /**
     * Delete the virtual machine console.
     *
     * <p>Delete the provided virtual machine console.
     *
     * @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 the virtual machine console.
     *
     * <p>Delete the provided virtual machine console.
     *
     * @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 Console resource.
     *
     * @param name resource name.
     * @return the first stage of the new Console definition.
     */
    Console.DefinitionStages.Blank define(String name);
}
