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

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of MachineLearningServices. */
public interface MachineLearningServices {
    /**
     * Gets services in specified workspace.
     *
     * @param resourceGroupName Name of the resource group in which workspace is located.
     * @param workspaceName Name of Azure Machine Learning workspace.
     * @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 services in specified workspace.
     */
    PagedIterable<ServiceResource> listByWorkspace(String resourceGroupName, String workspaceName);

    /**
     * Gets services in specified workspace.
     *
     * @param resourceGroupName Name of the resource group in which workspace is located.
     * @param workspaceName Name of Azure Machine Learning workspace.
     * @param skip Continuation token for pagination.
     * @param modelId The Model Id.
     * @param modelName The Model name.
     * @param tag The object tag.
     * @param tags A set of tags with which to filter the returned services. It is a comma separated string of tags key
     *     or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 .
     * @param properties A set of properties with which to filter the returned services. It is a comma separated string
     *     of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 .
     * @param runId runId for model associated with service.
     * @param expand Set to True to include Model details.
     * @param orderby The option to order the response.
     * @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 services in specified workspace.
     */
    PagedIterable<ServiceResource> listByWorkspace(
        String resourceGroupName,
        String workspaceName,
        String skip,
        String modelId,
        String modelName,
        String tag,
        String tags,
        String properties,
        String runId,
        Boolean expand,
        OrderString orderby,
        Context context);

    /**
     * Get a Service by name.
     *
     * @param resourceGroupName Name of the resource group in which workspace is located.
     * @param workspaceName Name of Azure Machine Learning workspace.
     * @param serviceName Name of the Azure Machine Learning 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 a Service by name.
     */
    ServiceResource get(String resourceGroupName, String workspaceName, String serviceName);

    /**
     * Get a Service by name.
     *
     * @param resourceGroupName Name of the resource group in which workspace is located.
     * @param workspaceName Name of Azure Machine Learning workspace.
     * @param serviceName Name of the Azure Machine Learning service.
     * @param expand Set to True to include Model details.
     * @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 Service by name.
     */
    Response<ServiceResource> getWithResponse(
        String resourceGroupName, String workspaceName, String serviceName, Boolean expand, Context context);

    /**
     * Delete a specific Service..
     *
     * @param resourceGroupName Name of the resource group in which workspace is located.
     * @param workspaceName Name of Azure Machine Learning workspace.
     * @param serviceName Name of the Azure Machine Learning 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.
     */
    void delete(String resourceGroupName, String workspaceName, String serviceName);

    /**
     * Delete a specific Service..
     *
     * @param resourceGroupName Name of the resource group in which workspace is located.
     * @param workspaceName Name of Azure Machine Learning workspace.
     * @param serviceName Name of the Azure Machine Learning 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 response.
     */
    Response<Void> deleteWithResponse(
        String resourceGroupName, String workspaceName, String serviceName, Context context);

    /**
     * Get a Service by name.
     *
     * @param id the resource ID.
     * @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 Service by name.
     */
    ServiceResource getById(String id);

    /**
     * Get a Service by name.
     *
     * @param id the resource ID.
     * @param expand Set to True to include Model details.
     * @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 Service by name.
     */
    Response<ServiceResource> getByIdWithResponse(String id, Boolean expand, Context context);

    /**
     * Delete a specific Service..
     *
     * @param id the resource ID.
     * @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.
     */
    void deleteById(String id);

    /**
     * Delete a specific Service..
     *
     * @param id the resource ID.
     * @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 response.
     */
    Response<Void> deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new ServiceResource resource.
     *
     * @param name resource name.
     * @return the first stage of the new ServiceResource definition.
     */
    ServiceResource.DefinitionStages.Blank define(String name);
}
