// 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.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.connectedvmware.fluent.models.InventoryItemInner;

/** An instance of this class provides access to all the operations defined in InventoryItemsClient. */
public interface InventoryItemsClient {
    /**
     * Implements InventoryItem PUT method.
     *
     * <p>Create Or Update InventoryItem.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param vcenterName Name of the vCenter.
     * @param inventoryItemName Name of the inventoryItem.
     * @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 inventory item.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    InventoryItemInner create(String resourceGroupName, String vcenterName, String inventoryItemName);

    /**
     * Implements InventoryItem PUT method.
     *
     * <p>Create Or Update InventoryItem.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param vcenterName Name of the vCenter.
     * @param inventoryItemName Name of the inventoryItem.
     * @param body Request payload.
     * @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 inventory item along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<InventoryItemInner> createWithResponse(
        String resourceGroupName,
        String vcenterName,
        String inventoryItemName,
        InventoryItemInner body,
        Context context);

    /**
     * Gets InventoryItem.
     *
     * <p>Implements InventoryItem GET method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param vcenterName Name of the vCenter.
     * @param inventoryItemName Name of the inventoryItem.
     * @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 inventory item.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    InventoryItemInner get(String resourceGroupName, String vcenterName, String inventoryItemName);

    /**
     * Gets InventoryItem.
     *
     * <p>Implements InventoryItem GET method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param vcenterName Name of the vCenter.
     * @param inventoryItemName Name of the inventoryItem.
     * @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 inventory item along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<InventoryItemInner> getWithResponse(
        String resourceGroupName, String vcenterName, String inventoryItemName, Context context);

    /**
     * Deletes an inventoryItem.
     *
     * <p>Implements inventoryItem DELETE method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param vcenterName Name of the vCenter.
     * @param inventoryItemName Name of the inventoryItem.
     * @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 vcenterName, String inventoryItemName);

    /**
     * Deletes an inventoryItem.
     *
     * <p>Implements inventoryItem DELETE method.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param vcenterName Name of the vCenter.
     * @param inventoryItemName Name of the inventoryItem.
     * @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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(
        String resourceGroupName, String vcenterName, String inventoryItemName, Context context);

    /**
     * Implements GET inventoryItems in a vCenter.
     *
     * <p>Returns the list of inventoryItems of the given vCenter.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param vcenterName Name of the vCenter.
     * @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 InventoryItems as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<InventoryItemInner> listByVCenter(String resourceGroupName, String vcenterName);

    /**
     * Implements GET inventoryItems in a vCenter.
     *
     * <p>Returns the list of inventoryItems of the given vCenter.
     *
     * @param resourceGroupName The Resource Group Name.
     * @param vcenterName Name of the vCenter.
     * @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 InventoryItems as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<InventoryItemInner> listByVCenter(String resourceGroupName, String vcenterName, Context context);
}
