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

package com.azure.resourcemanager.streamanalytics.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.util.Context;
import com.azure.resourcemanager.streamanalytics.fluent.models.TransformationInner;
import com.azure.resourcemanager.streamanalytics.models.TransformationsCreateOrReplaceResponse;
import com.azure.resourcemanager.streamanalytics.models.TransformationsGetResponse;
import com.azure.resourcemanager.streamanalytics.models.TransformationsUpdateResponse;

/** An instance of this class provides access to all the operations defined in TransformationsClient. */
public interface TransformationsClient {
    /**
     * Creates a transformation or replaces an already existing transformation under an existing streaming job.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param transformationName The name of the transformation.
     * @param transformation The definition of the transformation that will be used to create a new transformation or
     *     replace the existing one under the streaming job.
     * @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 transformation object, containing all information associated with the named transformation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    TransformationInner createOrReplace(
        String resourceGroupName, String jobName, String transformationName, TransformationInner transformation);

    /**
     * Creates a transformation or replaces an already existing transformation under an existing streaming job.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param transformationName The name of the transformation.
     * @param transformation The definition of the transformation that will be used to create a new transformation or
     *     replace the existing one under the streaming job.
     * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation.
     *     Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
     * @param ifNoneMatch Set to '*' to allow a new transformation to be created, but to prevent updating an existing
     *     transformation. Other values will result in a 412 Pre-condition Failed 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 a transformation object, containing all information associated with the named transformation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    TransformationsCreateOrReplaceResponse createOrReplaceWithResponse(
        String resourceGroupName,
        String jobName,
        String transformationName,
        TransformationInner transformation,
        String ifMatch,
        String ifNoneMatch,
        Context context);

    /**
     * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie.
     * update one or two properties) a transformation without affecting the rest the job or transformation definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param transformationName The name of the transformation.
     * @param transformation A Transformation object. The properties specified here will overwrite the corresponding
     *     properties in the existing transformation (ie. Those properties will be updated). Any properties that are set
     *     to null here will mean that the corresponding property in the existing transformation will remain the same
     *     and not change as a result of this PATCH 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 transformation object, containing all information associated with the named transformation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    TransformationInner update(
        String resourceGroupName, String jobName, String transformationName, TransformationInner transformation);

    /**
     * Updates an existing transformation under an existing streaming job. This can be used to partially update (ie.
     * update one or two properties) a transformation without affecting the rest the job or transformation definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param transformationName The name of the transformation.
     * @param transformation A Transformation object. The properties specified here will overwrite the corresponding
     *     properties in the existing transformation (ie. Those properties will be updated). Any properties that are set
     *     to null here will mean that the corresponding property in the existing transformation will remain the same
     *     and not change as a result of this PATCH operation.
     * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current transformation.
     *     Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
     * @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 transformation object, containing all information associated with the named transformation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    TransformationsUpdateResponse updateWithResponse(
        String resourceGroupName,
        String jobName,
        String transformationName,
        TransformationInner transformation,
        String ifMatch,
        Context context);

    /**
     * Gets details about the specified transformation.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param transformationName The name of the transformation.
     * @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 details about the specified transformation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    TransformationInner get(String resourceGroupName, String jobName, String transformationName);

    /**
     * Gets details about the specified transformation.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param transformationName The name of the transformation.
     * @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 details about the specified transformation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    TransformationsGetResponse getWithResponse(
        String resourceGroupName, String jobName, String transformationName, Context context);
}
