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

package com.azure.resourcemanager.baremetalinfrastructure.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.baremetalinfrastructure.fluent.models.AzureBareMetalInstanceInner;
import com.azure.resourcemanager.baremetalinfrastructure.models.Tags;

/** An instance of this class provides access to all the operations defined in AzureBareMetalInstancesClient. */
public interface AzureBareMetalInstancesClient {
    /**
     * Gets a list of Azure BareMetal instances in the specified subscription.
     *
     * <p>Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various
     * properties of each Azure BareMetal instance.
     *
     * @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 AzureBareMetal instances in the specified subscription as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AzureBareMetalInstanceInner> list();

    /**
     * Gets a list of Azure BareMetal instances in the specified subscription.
     *
     * <p>Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various
     * properties of each Azure BareMetal instance.
     *
     * @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 AzureBareMetal instances in the specified subscription as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AzureBareMetalInstanceInner> list(Context context);

    /**
     * Gets a list of Azure BareMetal instances in the specified subscription and resource group.
     *
     * <p>Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations
     * returns various properties of each Azure BareMetal instance.
     *
     * @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 a list of AzureBareMetal instances in the specified subscription and resource group as paginated response
     *     with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AzureBareMetalInstanceInner> listByResourceGroup(String resourceGroupName);

    /**
     * Gets a list of Azure BareMetal instances in the specified subscription and resource group.
     *
     * <p>Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations
     * returns various properties of each Azure BareMetal instance.
     *
     * @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 a list of AzureBareMetal instances in the specified subscription and resource group as paginated response
     *     with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AzureBareMetalInstanceInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Gets an Azure BareMetal instance.
     *
     * <p>Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
     * @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 an Azure BareMetal instance for the specified subscription, resource group, and instance name along with
     *     {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AzureBareMetalInstanceInner> getByResourceGroupWithResponse(
        String resourceGroupName, String azureBareMetalInstanceName, Context context);

    /**
     * Gets an Azure BareMetal instance.
     *
     * <p>Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
     * @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 an Azure BareMetal instance for the specified subscription, resource group, and instance name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AzureBareMetalInstanceInner getByResourceGroup(String resourceGroupName, String azureBareMetalInstanceName);

    /**
     * Patches the Tags field of a Azure BareMetal instance.
     *
     * <p>Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and
     * instance name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
     * @param tagsParameter Request body that only contains the new Tags field.
     * @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 azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties) along with {@link
     *     Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AzureBareMetalInstanceInner> updateWithResponse(
        String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter, Context context);

    /**
     * Patches the Tags field of a Azure BareMetal instance.
     *
     * <p>Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and
     * instance name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
     * @param tagsParameter Request body that only contains the new Tags field.
     * @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 azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties).
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AzureBareMetalInstanceInner update(String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter);
}
