// 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.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.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineInner;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonParameters;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePatchParameters;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerOffParameters;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceParameters;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunCommandParameters;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunDataExtractsParameters;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunReadCommandsParameters;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachineValidateHardwareParameters;

/** An instance of this class provides access to all the operations defined in BareMetalMachinesClient. */
public interface BareMetalMachinesClient {
    /**
     * List bare metal machines in the subscription.
     *
     * <p>Get a list of bare metal machines in the provided 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 a list of bare metal machines in the provided subscription as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<BareMetalMachineInner> list();

    /**
     * List bare metal machines in the subscription.
     *
     * <p>Get a list of bare metal machines in the provided 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 a list of bare metal machines in the provided subscription as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<BareMetalMachineInner> list(Context context);

    /**
     * List bare metal machines in the resource group.
     *
     * <p>Get a list of bare metal machines in the provided 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 a list of bare metal machines in the provided resource group as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<BareMetalMachineInner> listByResourceGroup(String resourceGroupName);

    /**
     * List bare metal machines in the resource group.
     *
     * <p>Get a list of bare metal machines in the provided 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 a list of bare metal machines in the provided resource group as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<BareMetalMachineInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Retrieve the bare metal machine.
     *
     * <p>Get properties of the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 properties of the provided bare metal machine along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<BareMetalMachineInner> getByResourceGroupWithResponse(
        String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Retrieve the bare metal machine.
     *
     * <p>Get properties of the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 properties of the provided bare metal machine.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    BareMetalMachineInner getByResourceGroup(String resourceGroupName, String bareMetalMachineName);

    /**
     * Create or update the bare metal machine.
     *
     * <p>Create a new bare metal machine or update the properties of the existing one. All customer initiated requests
     * will be rejected as the life cycle of this resource is managed by the system.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineParameters The request body.
     * @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 {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> beginCreateOrUpdate(
        String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters);

    /**
     * Create or update the bare metal machine.
     *
     * <p>Create a new bare metal machine or update the properties of the existing one. All customer initiated requests
     * will be rejected as the life cycle of this resource is managed by the system.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineParameters The 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 {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> beginCreateOrUpdate(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineInner bareMetalMachineParameters,
        Context context);

    /**
     * Create or update the bare metal machine.
     *
     * <p>Create a new bare metal machine or update the properties of the existing one. All customer initiated requests
     * will be rejected as the life cycle of this resource is managed by the system.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineParameters The request body.
     * @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 bareMetalMachine represents the physical machine in the rack.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    BareMetalMachineInner createOrUpdate(
        String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters);

    /**
     * Create or update the bare metal machine.
     *
     * <p>Create a new bare metal machine or update the properties of the existing one. All customer initiated requests
     * will be rejected as the life cycle of this resource is managed by the system.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineParameters The 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 bareMetalMachine represents the physical machine in the rack.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    BareMetalMachineInner createOrUpdate(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineInner bareMetalMachineParameters,
        Context context);

    /**
     * Delete the bare metal machine.
     *
     * <p>Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of
     * this resource is managed by the system.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String bareMetalMachineName);

    /**
     * Delete the bare metal machine.
     *
     * <p>Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of
     * this resource is managed by the system.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Delete the bare metal machine.
     *
     * <p>Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of
     * this resource is managed by the system.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String bareMetalMachineName);

    /**
     * Delete the bare metal machine.
     *
     * <p>Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of
     * this resource is managed by the system.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Patch the bare metal machine.
     *
     * <p>Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine.
     * Properties and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> beginUpdate(
        String resourceGroupName, String bareMetalMachineName);

    /**
     * Patch the bare metal machine.
     *
     * <p>Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine.
     * Properties and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineUpdateParameters The 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 {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<BareMetalMachineInner>, BareMetalMachineInner> beginUpdate(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachinePatchParameters bareMetalMachineUpdateParameters,
        Context context);

    /**
     * Patch the bare metal machine.
     *
     * <p>Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine.
     * Properties and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 bareMetalMachine represents the physical machine in the rack.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName);

    /**
     * Patch the bare metal machine.
     *
     * <p>Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine.
     * Properties and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineUpdateParameters The 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 bareMetalMachine represents the physical machine in the rack.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    BareMetalMachineInner update(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachinePatchParameters bareMetalMachineUpdateParameters,
        Context context);

    /**
     * Cordon the bare metal machine.
     *
     * <p>Cordon the provided bare metal machine's Kubernetes node.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginCordon(String resourceGroupName, String bareMetalMachineName);

    /**
     * Cordon the bare metal machine.
     *
     * <p>Cordon the provided bare metal machine's Kubernetes node.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineCordonParameters The 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginCordon(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineCordonParameters bareMetalMachineCordonParameters,
        Context context);

    /**
     * Cordon the bare metal machine.
     *
     * <p>Cordon the provided bare metal machine's Kubernetes node.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void cordon(String resourceGroupName, String bareMetalMachineName);

    /**
     * Cordon the bare metal machine.
     *
     * <p>Cordon the provided bare metal machine's Kubernetes node.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineCordonParameters The 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void cordon(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineCordonParameters bareMetalMachineCordonParameters,
        Context context);

    /**
     * Power off the bare metal machine.
     *
     * <p>Power off the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginPowerOff(String resourceGroupName, String bareMetalMachineName);

    /**
     * Power off the bare metal machine.
     *
     * <p>Power off the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachinePowerOffParameters The 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginPowerOff(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters,
        Context context);

    /**
     * Power off the bare metal machine.
     *
     * <p>Power off the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void powerOff(String resourceGroupName, String bareMetalMachineName);

    /**
     * Power off the bare metal machine.
     *
     * <p>Power off the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachinePowerOffParameters The 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void powerOff(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters,
        Context context);

    /**
     * Reimage the bare metal machine.
     *
     * <p>Reimage the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginReimage(String resourceGroupName, String bareMetalMachineName);

    /**
     * Reimage the bare metal machine.
     *
     * <p>Reimage the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginReimage(
        String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Reimage the bare metal machine.
     *
     * <p>Reimage the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void reimage(String resourceGroupName, String bareMetalMachineName);

    /**
     * Reimage the bare metal machine.
     *
     * <p>Reimage the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void reimage(String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Replace (service) the bare metal machine.
     *
     * <p>Replace the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginReplace(String resourceGroupName, String bareMetalMachineName);

    /**
     * Replace (service) the bare metal machine.
     *
     * <p>Replace the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineReplaceParameters The 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginReplace(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters,
        Context context);

    /**
     * Replace (service) the bare metal machine.
     *
     * <p>Replace the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void replace(String resourceGroupName, String bareMetalMachineName);

    /**
     * Replace (service) the bare metal machine.
     *
     * <p>Replace the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineReplaceParameters The 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void replace(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters,
        Context context);

    /**
     * Restart the bare metal machine.
     *
     * <p>Restart the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginRestart(String resourceGroupName, String bareMetalMachineName);

    /**
     * Restart the bare metal machine.
     *
     * <p>Restart the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginRestart(
        String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Restart the bare metal machine.
     *
     * <p>Restart the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void restart(String resourceGroupName, String bareMetalMachineName);

    /**
     * Restart the bare metal machine.
     *
     * <p>Restart the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void restart(String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Run the command on the bare metal machine.
     *
     * <p>Run the command or the script on the provided bare metal machine. The URL to storage account with the command
     * execution results and the command exit code can be retrieved from the operation status API once available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunCommandParameters The request body.
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginRunCommand(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters);

    /**
     * Run the command on the bare metal machine.
     *
     * <p>Run the command or the script on the provided bare metal machine. The URL to storage account with the command
     * execution results and the command exit code can be retrieved from the operation status API once available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunCommandParameters The 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginRunCommand(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters,
        Context context);

    /**
     * Run the command on the bare metal machine.
     *
     * <p>Run the command or the script on the provided bare metal machine. The URL to storage account with the command
     * execution results and the command exit code can be retrieved from the operation status API once available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunCommandParameters The request body.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void runCommand(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters);

    /**
     * Run the command on the bare metal machine.
     *
     * <p>Run the command or the script on the provided bare metal machine. The URL to storage account with the command
     * execution results and the command exit code can be retrieved from the operation status API once available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunCommandParameters The 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void runCommand(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters,
        Context context);

    /**
     * Run data extraction for a bare metal machine.
     *
     * <p>Run one or more data extractions on the provided bare metal machine. The URL to storage account with the
     * command execution results and the command exit code can be retrieved from the operation status API once
     * available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunDataExtractsParameters The request body.
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginRunDataExtracts(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters);

    /**
     * Run data extraction for a bare metal machine.
     *
     * <p>Run one or more data extractions on the provided bare metal machine. The URL to storage account with the
     * command execution results and the command exit code can be retrieved from the operation status API once
     * available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunDataExtractsParameters The 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginRunDataExtracts(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters,
        Context context);

    /**
     * Run data extraction for a bare metal machine.
     *
     * <p>Run one or more data extractions on the provided bare metal machine. The URL to storage account with the
     * command execution results and the command exit code can be retrieved from the operation status API once
     * available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunDataExtractsParameters The request body.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void runDataExtracts(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters);

    /**
     * Run data extraction for a bare metal machine.
     *
     * <p>Run one or more data extractions on the provided bare metal machine. The URL to storage account with the
     * command execution results and the command exit code can be retrieved from the operation status API once
     * available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunDataExtractsParameters The 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void runDataExtracts(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters,
        Context context);

    /**
     * Run read-only commands against a bare metal machine.
     *
     * <p>Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the
     * command execution results and the command exit code can be retrieved from the operation status API once
     * available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunReadCommandsParameters The request body.
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginRunReadCommands(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters);

    /**
     * Run read-only commands against a bare metal machine.
     *
     * <p>Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the
     * command execution results and the command exit code can be retrieved from the operation status API once
     * available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunReadCommandsParameters The 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginRunReadCommands(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters,
        Context context);

    /**
     * Run read-only commands against a bare metal machine.
     *
     * <p>Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the
     * command execution results and the command exit code can be retrieved from the operation status API once
     * available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunReadCommandsParameters The request body.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void runReadCommands(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters);

    /**
     * Run read-only commands against a bare metal machine.
     *
     * <p>Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the
     * command execution results and the command exit code can be retrieved from the operation status API once
     * available.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineRunReadCommandsParameters The 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void runReadCommands(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters,
        Context context);

    /**
     * Start the bare metal machine.
     *
     * <p>Start the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginStart(String resourceGroupName, String bareMetalMachineName);

    /**
     * Start the bare metal machine.
     *
     * <p>Start the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginStart(
        String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Start the bare metal machine.
     *
     * <p>Start the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void start(String resourceGroupName, String bareMetalMachineName);

    /**
     * Start the bare metal machine.
     *
     * <p>Start the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void start(String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Uncordon the bare metal machine.
     *
     * <p>Uncordon the provided bare metal machine's Kubernetes node.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginUncordon(String resourceGroupName, String bareMetalMachineName);

    /**
     * Uncordon the bare metal machine.
     *
     * <p>Uncordon the provided bare metal machine's Kubernetes node.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginUncordon(
        String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Uncordon the bare metal machine.
     *
     * <p>Uncordon the provided bare metal machine's Kubernetes node.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void uncordon(String resourceGroupName, String bareMetalMachineName);

    /**
     * Uncordon the bare metal machine.
     *
     * <p>Uncordon the provided bare metal machine's Kubernetes node.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void uncordon(String resourceGroupName, String bareMetalMachineName, Context context);

    /**
     * Trigger hardware validation of the bare metal machine.
     *
     * <p>Validate the hardware of the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineValidateHardwareParameters The request body.
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginValidateHardware(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineValidateHardwareParameters bareMetalMachineValidateHardwareParameters);

    /**
     * Trigger hardware validation of the bare metal machine.
     *
     * <p>Validate the hardware of the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineValidateHardwareParameters The 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginValidateHardware(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineValidateHardwareParameters bareMetalMachineValidateHardwareParameters,
        Context context);

    /**
     * Trigger hardware validation of the bare metal machine.
     *
     * <p>Validate the hardware of the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineValidateHardwareParameters The request body.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void validateHardware(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineValidateHardwareParameters bareMetalMachineValidateHardwareParameters);

    /**
     * Trigger hardware validation of the bare metal machine.
     *
     * <p>Validate the hardware of the provided bare metal machine.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param bareMetalMachineName The name of the bare metal machine.
     * @param bareMetalMachineValidateHardwareParameters The 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void validateHardware(
        String resourceGroupName,
        String bareMetalMachineName,
        BareMetalMachineValidateHardwareParameters bareMetalMachineValidateHardwareParameters,
        Context context);
}
