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

package com.azure.resourcemanager.hybridcontainerservice.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.hybridcontainerservice.fluent.models.StorageSpacesInner;
import com.azure.resourcemanager.hybridcontainerservice.models.StorageSpacesPatch;

/** An instance of this class provides access to all the operations defined in StorageSpacesOperationsClient. */
public interface StorageSpacesOperationsClient {
    /**
     * Gets the storage space object
     *
     * <p>Gets the Hybrid AKS storage space object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @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 Hybrid AKS storage space object along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<StorageSpacesInner> getByResourceGroupWithResponse(
        String resourceGroupName, String storageSpacesName, Context context);

    /**
     * Gets the storage space object
     *
     * <p>Gets the Hybrid AKS storage space object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @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 Hybrid AKS storage space object.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    StorageSpacesInner getByResourceGroup(String resourceGroupName, String storageSpacesName);

    /**
     * Puts the storage object
     *
     * <p>Puts the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @param storageSpaces The storageSpaces resource definition.
     * @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 the storageSpaces resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<StorageSpacesInner>, StorageSpacesInner> beginCreateOrUpdate(
        String resourceGroupName, String storageSpacesName, StorageSpacesInner storageSpaces);

    /**
     * Puts the storage object
     *
     * <p>Puts the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @param storageSpaces The storageSpaces resource definition.
     * @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 the storageSpaces resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<StorageSpacesInner>, StorageSpacesInner> beginCreateOrUpdate(
        String resourceGroupName, String storageSpacesName, StorageSpacesInner storageSpaces, Context context);

    /**
     * Puts the storage object
     *
     * <p>Puts the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @param storageSpaces The storageSpaces resource definition.
     * @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 storageSpaces resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    StorageSpacesInner createOrUpdate(
        String resourceGroupName, String storageSpacesName, StorageSpacesInner storageSpaces);

    /**
     * Puts the storage object
     *
     * <p>Puts the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @param storageSpaces The storageSpaces resource definition.
     * @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 storageSpaces resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    StorageSpacesInner createOrUpdate(
        String resourceGroupName, String storageSpacesName, StorageSpacesInner storageSpaces, Context context);

    /**
     * Deletes the storage object
     *
     * <p>Deletes the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @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 storageSpacesName, Context context);

    /**
     * Deletes the storage object
     *
     * <p>Deletes the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @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 storageSpacesName);

    /**
     * Patches the storage object
     *
     * <p>Patches the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @param storageSpaces The storageSpaces resource patch definition.
     * @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 the storageSpaces resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<StorageSpacesInner>, StorageSpacesInner> beginUpdate(
        String resourceGroupName, String storageSpacesName, StorageSpacesPatch storageSpaces);

    /**
     * Patches the storage object
     *
     * <p>Patches the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @param storageSpaces The storageSpaces resource patch definition.
     * @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 the storageSpaces resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<StorageSpacesInner>, StorageSpacesInner> beginUpdate(
        String resourceGroupName, String storageSpacesName, StorageSpacesPatch storageSpaces, Context context);

    /**
     * Patches the storage object
     *
     * <p>Patches the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @param storageSpaces The storageSpaces resource patch definition.
     * @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 storageSpaces resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    StorageSpacesInner update(String resourceGroupName, String storageSpacesName, StorageSpacesPatch storageSpaces);

    /**
     * Patches the storage object
     *
     * <p>Patches the Hybrid AKS storage object.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param storageSpacesName Parameter for the name of the storage object.
     * @param storageSpaces The storageSpaces resource patch definition.
     * @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 storageSpaces resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    StorageSpacesInner update(
        String resourceGroupName, String storageSpacesName, StorageSpacesPatch storageSpaces, Context context);

    /**
     * List the storage object by resource group
     *
     * <p>List the Hybrid AKS storage object by 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 the paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<StorageSpacesInner> listByResourceGroup(String resourceGroupName);

    /**
     * List the storage object by resource group
     *
     * <p>List the Hybrid AKS storage object by 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 the paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<StorageSpacesInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * List the storage object by subscription
     *
     * <p>List the Hybrid AKS storage object by 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 the paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<StorageSpacesInner> list();

    /**
     * List the storage object by subscription
     *
     * <p>List the Hybrid AKS storage object by 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 the paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<StorageSpacesInner> list(Context context);
}
