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

package com.azure.resourcemanager.operationsmanagement.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
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.operationsmanagement.fluent.models.SolutionInner;
import com.azure.resourcemanager.operationsmanagement.fluent.models.SolutionPropertiesListInner;
import com.azure.resourcemanager.operationsmanagement.models.SolutionPatch;

/** An instance of this class provides access to all the operations defined in SolutionsClient. */
public interface SolutionsClient {
    /**
     * Create/Update Solution.
     *
     * <p>Creates or updates the Solution.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @param parameters The parameters required to create OMS Solution.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<SolutionInner>, SolutionInner> beginCreateOrUpdate(
        String resourceGroupName, String solutionName, SolutionInner parameters);

    /**
     * Create/Update Solution.
     *
     * <p>Creates or updates the Solution.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @param parameters The parameters required to create OMS Solution.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<SolutionInner>, SolutionInner> beginCreateOrUpdate(
        String resourceGroupName, String solutionName, SolutionInner parameters, Context context);

    /**
     * Create/Update Solution.
     *
     * <p>Creates or updates the Solution.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @param parameters The parameters required to create OMS Solution.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SolutionInner createOrUpdate(String resourceGroupName, String solutionName, SolutionInner parameters);

    /**
     * Create/Update Solution.
     *
     * <p>Creates or updates the Solution.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @param parameters The parameters required to create OMS Solution.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SolutionInner createOrUpdate(
        String resourceGroupName, String solutionName, SolutionInner parameters, Context context);

    /**
     * Patch a Solution.
     *
     * <p>Patch a Solution. Only updating tags supported.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @param parameters The parameters required to patch a Solution.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<SolutionInner>, SolutionInner> beginUpdate(
        String resourceGroupName, String solutionName, SolutionPatch parameters);

    /**
     * Patch a Solution.
     *
     * <p>Patch a Solution. Only updating tags supported.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @param parameters The parameters required to patch a Solution.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<SolutionInner>, SolutionInner> beginUpdate(
        String resourceGroupName, String solutionName, SolutionPatch parameters, Context context);

    /**
     * Patch a Solution.
     *
     * <p>Patch a Solution. Only updating tags supported.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @param parameters The parameters required to patch a Solution.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SolutionInner update(String resourceGroupName, String solutionName, SolutionPatch parameters);

    /**
     * Patch a Solution.
     *
     * <p>Patch a Solution. Only updating tags supported.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @param parameters The parameters required to patch a Solution.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SolutionInner update(String resourceGroupName, String solutionName, SolutionPatch parameters, Context context);

    /**
     * Deletes the solution
     *
     * <p>Deletes the solution in the subscription.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @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 solutionName);

    /**
     * Deletes the solution
     *
     * <p>Deletes the solution in the subscription.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @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 solutionName, Context context);

    /**
     * Deletes the solution
     *
     * <p>Deletes the solution in the subscription.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @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 solutionName);

    /**
     * Deletes the solution
     *
     * <p>Deletes the solution in the subscription.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @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 solutionName, Context context);

    /**
     * Retrieve solution.
     *
     * <p>Retrieves the user solution.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @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 container for solution along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SolutionInner> getByResourceGroupWithResponse(
        String resourceGroupName, String solutionName, Context context);

    /**
     * Retrieve solution.
     *
     * <p>Retrieves the user solution.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param solutionName User Solution Name.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SolutionInner getByResourceGroup(String resourceGroupName, String solutionName);

    /**
     * Retrieves the solution list for the subscription
     *
     * <p>Retrieves the solution list. It will retrieve both first party and third party solutions.
     *
     * @param resourceGroupName The name of the resource group to get. 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 the list of solution response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SolutionPropertiesListInner> listByResourceGroupWithResponse(String resourceGroupName, Context context);

    /**
     * Retrieves the solution list for the subscription
     *
     * <p>Retrieves the solution list. It will retrieve both first party and third party solutions.
     *
     * @param resourceGroupName The name of the resource group to get. 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 the list of solution response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SolutionPropertiesListInner listByResourceGroup(String resourceGroupName);

    /**
     * Retrieves the solution list for the subscription
     *
     * <p>Retrieves the solution list. It will retrieve both first party and third party solutions.
     *
     * @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 list of solution response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SolutionPropertiesListInner> listBySubscriptionWithResponse(Context context);

    /**
     * Retrieves the solution list for the subscription
     *
     * <p>Retrieves the solution list. It will retrieve both first party and third party solutions.
     *
     * @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 list of solution response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SolutionPropertiesListInner listBySubscription();
}
