// 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.VolumeInner;
import com.azure.resourcemanager.networkcloud.models.VolumePatchParameters;

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

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

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

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

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

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

    /**
     * Create or update the volume.
     *
     * <p>Create a new volume or update the properties of the existing one.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @param volumeParameters 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 volume represents storage made available for use by resources
     *     running on the cluster.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<VolumeInner>, VolumeInner> beginCreateOrUpdate(
        String resourceGroupName, String volumeName, VolumeInner volumeParameters);

    /**
     * Create or update the volume.
     *
     * <p>Create a new volume or update the properties of the existing one.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @param volumeParameters 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 volume represents storage made available for use by resources
     *     running on the cluster.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<VolumeInner>, VolumeInner> beginCreateOrUpdate(
        String resourceGroupName, String volumeName, VolumeInner volumeParameters, Context context);

    /**
     * Create or update the volume.
     *
     * <p>Create a new volume or update the properties of the existing one.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @param volumeParameters 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 volume represents storage made available for use by resources running on the cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    VolumeInner createOrUpdate(String resourceGroupName, String volumeName, VolumeInner volumeParameters);

    /**
     * Create or update the volume.
     *
     * <p>Create a new volume or update the properties of the existing one.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @param volumeParameters 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 volume represents storage made available for use by resources running on the cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    VolumeInner createOrUpdate(
        String resourceGroupName, String volumeName, VolumeInner volumeParameters, Context context);

    /**
     * Delete the volume.
     *
     * <p>Delete the provided volume.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @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 volumeName);

    /**
     * Delete the volume.
     *
     * <p>Delete the provided volume.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @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 volumeName, Context context);

    /**
     * Delete the volume.
     *
     * <p>Delete the provided volume.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @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 volumeName);

    /**
     * Delete the volume.
     *
     * <p>Delete the provided volume.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @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 volumeName, Context context);

    /**
     * Patch the volume.
     *
     * <p>Update tags associated with the provided volume.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @param volumeUpdateParameters 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 volume represents storage made available for use by resources running on the cluster along with {@link
     *     Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<VolumeInner> updateWithResponse(
        String resourceGroupName, String volumeName, VolumePatchParameters volumeUpdateParameters, Context context);

    /**
     * Patch the volume.
     *
     * <p>Update tags associated with the provided volume.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param volumeName The name of the volume.
     * @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 volume represents storage made available for use by resources running on the cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    VolumeInner update(String resourceGroupName, String volumeName);
}
