// 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 HybridIdentityMetadatas. */
public interface HybridIdentityMetadatas {
    /**
     * Gets HybridIdentityMetadata.
     *
     * <p>Implements HybridIdentityMetadata GET method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param virtualMachineName Name of the vm.
     * @param metadataName Name of the HybridIdentityMetadata.
     * @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 HybridIdentityMetadata.
     */
    HybridIdentityMetadata get(String resourceGroupName, String virtualMachineName, String metadataName);

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

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

    /**
     * Deletes an HybridIdentityMetadata.
     *
     * <p>Implements HybridIdentityMetadata DELETE method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param virtualMachineName Name of the vm.
     * @param metadataName Name of the HybridIdentityMetadata.
     * @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 Response}.
     */
    Response<Void> deleteWithResponse(
        String resourceGroupName, String virtualMachineName, String metadataName, Context context);

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

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

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

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

    /**
     * Deletes an HybridIdentityMetadata.
     *
     * <p>Implements HybridIdentityMetadata 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 HybridIdentityMetadata.
     *
     * <p>Implements HybridIdentityMetadata 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.
     * @return the {@link Response}.
     */
    Response<Void> deleteByIdWithResponse(String id, Context context);

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