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

package com.azure.resourcemanager.timeseriesinsights.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.timeseriesinsights.fluent.models.EventSourceListResponseInner;
import com.azure.resourcemanager.timeseriesinsights.fluent.models.EventSourceResourceInner;
import com.azure.resourcemanager.timeseriesinsights.models.EventSourceCreateOrUpdateParameters;
import com.azure.resourcemanager.timeseriesinsights.models.EventSourceUpdateParameters;

/** An instance of this class provides access to all the operations defined in EventSourcesClient. */
public interface EventSourcesClient {
    /**
     * Create or update an event source under the specified environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @param eventSourceName Name of the event source.
     * @param parameters Parameters for creating an event source 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 an environment receives data from one or more event sources along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<EventSourceResourceInner> createOrUpdateWithResponse(
        String resourceGroupName,
        String environmentName,
        String eventSourceName,
        EventSourceCreateOrUpdateParameters parameters,
        Context context);

    /**
     * Create or update an event source under the specified environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @param eventSourceName Name of the event source.
     * @param parameters Parameters for creating an event source 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 an environment receives data from one or more event sources.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    EventSourceResourceInner createOrUpdate(
        String resourceGroupName,
        String environmentName,
        String eventSourceName,
        EventSourceCreateOrUpdateParameters parameters);

    /**
     * Gets the event source with the specified name in the specified environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @param eventSourceName The name of the Time Series Insights event source associated with the specified
     *     environment.
     * @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 event source with the specified name in the specified environment along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<EventSourceResourceInner> getWithResponse(
        String resourceGroupName, String environmentName, String eventSourceName, Context context);

    /**
     * Gets the event source with the specified name in the specified environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @param eventSourceName The name of the Time Series Insights event source associated with the specified
     *     environment.
     * @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 event source with the specified name in the specified environment.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    EventSourceResourceInner get(String resourceGroupName, String environmentName, String eventSourceName);

    /**
     * Updates the event source with the specified name in the specified subscription, resource group, and environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @param eventSourceName The name of the Time Series Insights event source associated with the specified
     *     environment.
     * @param eventSourceUpdateParameters Request object that contains the updated information for the event source.
     * @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 an environment receives data from one or more event sources along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<EventSourceResourceInner> updateWithResponse(
        String resourceGroupName,
        String environmentName,
        String eventSourceName,
        EventSourceUpdateParameters eventSourceUpdateParameters,
        Context context);

    /**
     * Updates the event source with the specified name in the specified subscription, resource group, and environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @param eventSourceName The name of the Time Series Insights event source associated with the specified
     *     environment.
     * @param eventSourceUpdateParameters Request object that contains the updated information for the event source.
     * @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 an environment receives data from one or more event sources.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    EventSourceResourceInner update(
        String resourceGroupName,
        String environmentName,
        String eventSourceName,
        EventSourceUpdateParameters eventSourceUpdateParameters);

    /**
     * Deletes the event source with the specified name in the specified subscription, resource group, and environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @param eventSourceName The name of the Time Series Insights event source associated with the specified
     *     environment.
     * @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> deleteWithResponse(
        String resourceGroupName, String environmentName, String eventSourceName, Context context);

    /**
     * Deletes the event source with the specified name in the specified subscription, resource group, and environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @param eventSourceName The name of the Time Series Insights event source associated with the specified
     *     environment.
     * @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 environmentName, String eventSourceName);

    /**
     * Lists all the available event sources associated with the subscription and within the specified resource group
     * and environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @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 of the List EventSources operation along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<EventSourceListResponseInner> listByEnvironmentWithResponse(
        String resourceGroupName, String environmentName, Context context);

    /**
     * Lists all the available event sources associated with the subscription and within the specified resource group
     * and environment.
     *
     * @param resourceGroupName Name of an Azure Resource group.
     * @param environmentName The name of the Time Series Insights environment associated with the specified resource
     *     group.
     * @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 of the List EventSources operation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    EventSourceListResponseInner listByEnvironment(String resourceGroupName, String environmentName);
}
