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

package com.azure.resourcemanager.customerinsights.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.customerinsights.fluent.models.PredictionModelStatusInner;
import com.azure.resourcemanager.customerinsights.fluent.models.PredictionResourceFormatInner;
import com.azure.resourcemanager.customerinsights.fluent.models.PredictionTrainingResultsInner;

/** An instance of this class provides access to all the operations defined in PredictionsClient. */
public interface PredictionsClient {
    /**
     * Creates a Prediction or updates an existing Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @param parameters Parameters supplied to the create/update Prediction 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 prediction resource format.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<PredictionResourceFormatInner>, PredictionResourceFormatInner> beginCreateOrUpdate(
        String resourceGroupName, String hubName, String predictionName, PredictionResourceFormatInner parameters);

    /**
     * Creates a Prediction or updates an existing Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @param parameters Parameters supplied to the create/update Prediction 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 the prediction resource format.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<PredictionResourceFormatInner>, PredictionResourceFormatInner> beginCreateOrUpdate(
        String resourceGroupName,
        String hubName,
        String predictionName,
        PredictionResourceFormatInner parameters,
        Context context);

    /**
     * Creates a Prediction or updates an existing Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @param parameters Parameters supplied to the create/update Prediction 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 prediction resource format.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PredictionResourceFormatInner createOrUpdate(
        String resourceGroupName, String hubName, String predictionName, PredictionResourceFormatInner parameters);

    /**
     * Creates a Prediction or updates an existing Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @param parameters Parameters supplied to the create/update Prediction 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 prediction resource format.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PredictionResourceFormatInner createOrUpdate(
        String resourceGroupName,
        String hubName,
        String predictionName,
        PredictionResourceFormatInner parameters,
        Context context);

    /**
     * Gets a Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 Prediction in the hub along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PredictionResourceFormatInner> getWithResponse(
        String resourceGroupName, String hubName, String predictionName, Context context);

    /**
     * Gets a Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 Prediction in the hub.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PredictionResourceFormatInner get(String resourceGroupName, String hubName, String predictionName);

    /**
     * Deletes a Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 hubName, String predictionName);

    /**
     * Deletes a Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 hubName, String predictionName, Context context);

    /**
     * Deletes a Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 hubName, String predictionName);

    /**
     * Deletes a Prediction in the hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 hubName, String predictionName, Context context);

    /**
     * Gets training results.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 training results along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PredictionTrainingResultsInner> getTrainingResultsWithResponse(
        String resourceGroupName, String hubName, String predictionName, Context context);

    /**
     * Gets training results.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 training results.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PredictionTrainingResultsInner getTrainingResults(String resourceGroupName, String hubName, String predictionName);

    /**
     * Gets model status of the prediction.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 model status of the prediction along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PredictionModelStatusInner> getModelStatusWithResponse(
        String resourceGroupName, String hubName, String predictionName, Context context);

    /**
     * Gets model status of the prediction.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @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 model status of the prediction.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PredictionModelStatusInner getModelStatus(String resourceGroupName, String hubName, String predictionName);

    /**
     * Creates or updates the model status of prediction.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @param parameters Parameters supplied to the create/update prediction model status 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 Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> modelStatusWithResponse(
        String resourceGroupName,
        String hubName,
        String predictionName,
        PredictionModelStatusInner parameters,
        Context context);

    /**
     * Creates or updates the model status of prediction.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @param predictionName The name of the Prediction.
     * @param parameters Parameters supplied to the create/update prediction model status 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 modelStatus(
        String resourceGroupName, String hubName, String predictionName, PredictionModelStatusInner parameters);

    /**
     * Gets all the predictions in the specified hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @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 all the predictions in the specified hub as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<PredictionResourceFormatInner> listByHub(String resourceGroupName, String hubName);

    /**
     * Gets all the predictions in the specified hub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param hubName The name of the hub.
     * @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 all the predictions in the specified hub as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<PredictionResourceFormatInner> listByHub(String resourceGroupName, String hubName, Context context);
}
