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

package com.azure.resourcemanager.storagepool.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.storagepool.fluent.models.IscsiTargetInner;
import com.azure.resourcemanager.storagepool.models.IscsiTargetCreate;
import com.azure.resourcemanager.storagepool.models.IscsiTargetUpdate;

/** An instance of this class provides access to all the operations defined in IscsiTargetsClient. */
public interface IscsiTargetsClient {
    /**
     * Get iSCSI Targets in a Disk pool.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @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 iSCSI Targets in a Disk pool as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<IscsiTargetInner> listByDiskPool(String resourceGroupName, String diskPoolName);

    /**
     * Get iSCSI Targets in a Disk pool.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @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 iSCSI Targets in a Disk pool as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<IscsiTargetInner> listByDiskPool(String resourceGroupName, String diskPoolName, Context context);

    /**
     * Create or Update an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 response for iSCSI Target requests.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<IscsiTargetInner>, IscsiTargetInner> beginCreateOrUpdate(
        String resourceGroupName,
        String diskPoolName,
        String iscsiTargetName,
        IscsiTargetCreate iscsiTargetCreatePayload);

    /**
     * Create or Update an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
     * @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 response for iSCSI Target requests.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<IscsiTargetInner>, IscsiTargetInner> beginCreateOrUpdate(
        String resourceGroupName,
        String diskPoolName,
        String iscsiTargetName,
        IscsiTargetCreate iscsiTargetCreatePayload,
        Context context);

    /**
     * Create or Update an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 response for iSCSI Target requests.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    IscsiTargetInner createOrUpdate(
        String resourceGroupName,
        String diskPoolName,
        String iscsiTargetName,
        IscsiTargetCreate iscsiTargetCreatePayload);

    /**
     * Create or Update an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
     * @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 response for iSCSI Target requests.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    IscsiTargetInner createOrUpdate(
        String resourceGroupName,
        String diskPoolName,
        String iscsiTargetName,
        IscsiTargetCreate iscsiTargetCreatePayload,
        Context context);

    /**
     * Update an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update 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 response for iSCSI Target requests.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<IscsiTargetInner>, IscsiTargetInner> beginUpdate(
        String resourceGroupName,
        String diskPoolName,
        String iscsiTargetName,
        IscsiTargetUpdate iscsiTargetUpdatePayload);

    /**
     * Update an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation.
     * @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 response for iSCSI Target requests.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<IscsiTargetInner>, IscsiTargetInner> beginUpdate(
        String resourceGroupName,
        String diskPoolName,
        String iscsiTargetName,
        IscsiTargetUpdate iscsiTargetUpdatePayload,
        Context context);

    /**
     * Update an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update 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 response for iSCSI Target requests.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    IscsiTargetInner update(
        String resourceGroupName,
        String diskPoolName,
        String iscsiTargetName,
        IscsiTargetUpdate iscsiTargetUpdatePayload);

    /**
     * Update an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation.
     * @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 response for iSCSI Target requests.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    IscsiTargetInner update(
        String resourceGroupName,
        String diskPoolName,
        String iscsiTargetName,
        IscsiTargetUpdate iscsiTargetUpdatePayload,
        Context context);

    /**
     * Delete an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @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 diskPoolName, String iscsiTargetName);

    /**
     * Delete an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @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 diskPoolName, String iscsiTargetName, Context context);

    /**
     * Delete an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @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 diskPoolName, String iscsiTargetName);

    /**
     * Delete an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @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 diskPoolName, String iscsiTargetName, Context context);

    /**
     * Get an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @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 an iSCSI Target along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<IscsiTargetInner> getWithResponse(
        String resourceGroupName, String diskPoolName, String iscsiTargetName, Context context);

    /**
     * Get an iSCSI Target.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param diskPoolName The name of the Disk Pool.
     * @param iscsiTargetName The name of the iSCSI Target.
     * @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 an iSCSI Target.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    IscsiTargetInner get(String resourceGroupName, String diskPoolName, String iscsiTargetName);
}
