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

package com.azure.resourcemanager.connectedvmware.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 GuestAgents. */
public interface GuestAgents {
    /**
     * Gets GuestAgent.
     *
     * <p>Implements GuestAgent GET method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param virtualMachineName Name of the vm.
     * @param name Name of the GuestAgent.
     * @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 defines the GuestAgent.
     */
    GuestAgent get(String resourceGroupName, String virtualMachineName, String name);

    /**
     * Gets GuestAgent.
     *
     * <p>Implements GuestAgent GET method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param virtualMachineName Name of the vm.
     * @param name Name of the GuestAgent.
     * @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 defines the GuestAgent along with {@link Response}.
     */
    Response<GuestAgent> getWithResponse(
        String resourceGroupName, String virtualMachineName, String name, Context context);

    /**
     * Deletes an GuestAgent.
     *
     * <p>Implements GuestAgent DELETE method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param virtualMachineName Name of the vm.
     * @param name Name of the GuestAgent.
     * @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 name);

    /**
     * Deletes an GuestAgent.
     *
     * <p>Implements GuestAgent DELETE method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param virtualMachineName Name of the vm.
     * @param name Name of the GuestAgent.
     * @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 name, Context context);

    /**
     * Implements GET GuestAgent in a vm.
     *
     * <p>Returns the list of GuestAgent of the given vm.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param virtualMachineName Name of the vm.
     * @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 list of GuestAgent as paginated response with {@link PagedIterable}.
     */
    PagedIterable<GuestAgent> listByVm(String resourceGroupName, String virtualMachineName);

    /**
     * Implements GET GuestAgent in a vm.
     *
     * <p>Returns the list of GuestAgent of the given vm.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param virtualMachineName Name of the vm.
     * @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 list of GuestAgent as paginated response with {@link PagedIterable}.
     */
    PagedIterable<GuestAgent> listByVm(String resourceGroupName, String virtualMachineName, Context context);

    /**
     * Gets GuestAgent.
     *
     * <p>Implements GuestAgent GET method.
     *
     * @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 defines the GuestAgent along with {@link Response}.
     */
    GuestAgent getById(String id);

    /**
     * Gets GuestAgent.
     *
     * <p>Implements GuestAgent GET method.
     *
     * @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 defines the GuestAgent along with {@link Response}.
     */
    Response<GuestAgent> getByIdWithResponse(String id, Context context);

    /**
     * Deletes an GuestAgent.
     *
     * <p>Implements GuestAgent DELETE method.
     *
     * @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);

    /**
     * Deletes an GuestAgent.
     *
     * <p>Implements GuestAgent DELETE method.
     *
     * @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 GuestAgent resource.
     *
     * @param name resource name.
     * @return the first stage of the new GuestAgent definition.
     */
    GuestAgent.DefinitionStages.Blank define(String name);
}
