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

package com.azure.resourcemanager.healthcareapis.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.healthcareapis.fluent.models.DicomServiceInner;
import com.azure.resourcemanager.healthcareapis.models.DicomServicePatchResource;

/** An instance of this class provides access to all the operations defined in DicomServicesClient. */
public interface DicomServicesClient {
    /**
     * Lists all DICOM Services for the given workspace.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param workspaceName The name of workspace resource.
     * @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 collection of Dicom Services as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<DicomServiceInner> listByWorkspace(String resourceGroupName, String workspaceName);

    /**
     * Lists all DICOM Services for the given workspace.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param workspaceName The name of workspace resource.
     * @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 collection of Dicom Services as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<DicomServiceInner> listByWorkspace(String resourceGroupName, String workspaceName, Context context);

    /**
     * Gets the properties of the specified DICOM Service.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param workspaceName The name of workspace resource.
     * @param dicomServiceName The name of DICOM Service resource.
     * @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 properties of the specified DICOM Service.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DicomServiceInner get(String resourceGroupName, String workspaceName, String dicomServiceName);

    /**
     * Gets the properties of the specified DICOM Service.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param workspaceName The name of workspace resource.
     * @param dicomServiceName The name of DICOM Service resource.
     * @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 properties of the specified DICOM Service along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<DicomServiceInner> getWithResponse(
        String resourceGroupName, String workspaceName, String dicomServiceName, Context context);

    /**
     * Creates or updates a DICOM Service resource with the specified parameters.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param workspaceName The name of workspace resource.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param dicomservice The parameters for creating or updating a Dicom Service resource.
     * @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 description of Dicom Service.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DicomServiceInner>, DicomServiceInner> beginCreateOrUpdate(
        String resourceGroupName, String workspaceName, String dicomServiceName, DicomServiceInner dicomservice);

    /**
     * Creates or updates a DICOM Service resource with the specified parameters.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param workspaceName The name of workspace resource.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param dicomservice The parameters for creating or updating a Dicom Service resource.
     * @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 description of Dicom Service.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DicomServiceInner>, DicomServiceInner> beginCreateOrUpdate(
        String resourceGroupName,
        String workspaceName,
        String dicomServiceName,
        DicomServiceInner dicomservice,
        Context context);

    /**
     * Creates or updates a DICOM Service resource with the specified parameters.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param workspaceName The name of workspace resource.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param dicomservice The parameters for creating or updating a Dicom Service resource.
     * @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 description of Dicom Service.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DicomServiceInner createOrUpdate(
        String resourceGroupName, String workspaceName, String dicomServiceName, DicomServiceInner dicomservice);

    /**
     * Creates or updates a DICOM Service resource with the specified parameters.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param workspaceName The name of workspace resource.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param dicomservice The parameters for creating or updating a Dicom Service resource.
     * @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 description of Dicom Service.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DicomServiceInner createOrUpdate(
        String resourceGroupName,
        String workspaceName,
        String dicomServiceName,
        DicomServiceInner dicomservice,
        Context context);

    /**
     * Patch DICOM Service details.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param workspaceName The name of workspace resource.
     * @param dicomservicePatchResource The parameters for updating a Dicom Service.
     * @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 description of Dicom Service.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DicomServiceInner>, DicomServiceInner> beginUpdate(
        String resourceGroupName,
        String dicomServiceName,
        String workspaceName,
        DicomServicePatchResource dicomservicePatchResource);

    /**
     * Patch DICOM Service details.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param workspaceName The name of workspace resource.
     * @param dicomservicePatchResource The parameters for updating a Dicom Service.
     * @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 description of Dicom Service.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DicomServiceInner>, DicomServiceInner> beginUpdate(
        String resourceGroupName,
        String dicomServiceName,
        String workspaceName,
        DicomServicePatchResource dicomservicePatchResource,
        Context context);

    /**
     * Patch DICOM Service details.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param workspaceName The name of workspace resource.
     * @param dicomservicePatchResource The parameters for updating a Dicom Service.
     * @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 description of Dicom Service.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DicomServiceInner update(
        String resourceGroupName,
        String dicomServiceName,
        String workspaceName,
        DicomServicePatchResource dicomservicePatchResource);

    /**
     * Patch DICOM Service details.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param workspaceName The name of workspace resource.
     * @param dicomservicePatchResource The parameters for updating a Dicom Service.
     * @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 description of Dicom Service.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DicomServiceInner update(
        String resourceGroupName,
        String dicomServiceName,
        String workspaceName,
        DicomServicePatchResource dicomservicePatchResource,
        Context context);

    /**
     * Deletes a DICOM Service.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param workspaceName The name of workspace resource.
     * @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 dicomServiceName, String workspaceName);

    /**
     * Deletes a DICOM Service.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param workspaceName The name of workspace resource.
     * @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 dicomServiceName, String workspaceName, Context context);

    /**
     * Deletes a DICOM Service.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param workspaceName The name of workspace resource.
     * @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 dicomServiceName, String workspaceName);

    /**
     * Deletes a DICOM Service.
     *
     * @param resourceGroupName The name of the resource group that contains the service instance.
     * @param dicomServiceName The name of DICOM Service resource.
     * @param workspaceName The name of workspace resource.
     * @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 dicomServiceName, String workspaceName, Context context);
}
