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

package com.azure.resourcemanager.logic.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 IntegrationAccounts. */
public interface IntegrationAccounts {
    /**
     * Gets a list of integration accounts by subscription.
     *
     * @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 list of integration accounts by subscription as paginated response with {@link PagedIterable}.
     */
    PagedIterable<IntegrationAccount> list();

    /**
     * Gets a list of integration accounts by subscription.
     *
     * @param top The number of items to be included in the result.
     * @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 list of integration accounts by subscription as paginated response with {@link PagedIterable}.
     */
    PagedIterable<IntegrationAccount> list(Integer top, Context context);

    /**
     * Gets a list of integration accounts by resource group.
     *
     * @param resourceGroupName The resource group 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 a list of integration accounts by resource group as paginated response with {@link PagedIterable}.
     */
    PagedIterable<IntegrationAccount> listByResourceGroup(String resourceGroupName);

    /**
     * Gets a list of integration accounts by resource group.
     *
     * @param resourceGroupName The resource group name.
     * @param top The number of items to be included in the result.
     * @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 list of integration accounts by resource group as paginated response with {@link PagedIterable}.
     */
    PagedIterable<IntegrationAccount> listByResourceGroup(String resourceGroupName, Integer top, Context context);

    /**
     * Gets an integration account.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account 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 an integration account along with {@link Response}.
     */
    Response<IntegrationAccount> getByResourceGroupWithResponse(
        String resourceGroupName, String integrationAccountName, Context context);

    /**
     * Gets an integration account.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account 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 an integration account.
     */
    IntegrationAccount getByResourceGroup(String resourceGroupName, String integrationAccountName);

    /**
     * Deletes an integration account.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account 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 Response}.
     */
    Response<Void> deleteByResourceGroupWithResponse(
        String resourceGroupName, String integrationAccountName, Context context);

    /**
     * Deletes an integration account.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account 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.
     */
    void deleteByResourceGroup(String resourceGroupName, String integrationAccountName);

    /**
     * Gets the integration account callback URL.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account name.
     * @param parameters The callback URL parameters.
     * @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 integration account callback URL along with {@link Response}.
     */
    Response<CallbackUrl> listCallbackUrlWithResponse(
        String resourceGroupName, String integrationAccountName, GetCallbackUrlParameters parameters, Context context);

    /**
     * Gets the integration account callback URL.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account name.
     * @param parameters The callback URL parameters.
     * @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 integration account callback URL.
     */
    CallbackUrl listCallbackUrl(
        String resourceGroupName, String integrationAccountName, GetCallbackUrlParameters parameters);

    /**
     * Gets the integration account's Key Vault keys.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account name.
     * @param listKeyVaultKeys The key vault parameters.
     * @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 integration account's Key Vault keys as paginated response with {@link PagedIterable}.
     */
    PagedIterable<KeyVaultKey> listKeyVaultKeys(
        String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinition listKeyVaultKeys);

    /**
     * Gets the integration account's Key Vault keys.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account name.
     * @param listKeyVaultKeys The key vault parameters.
     * @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 integration account's Key Vault keys as paginated response with {@link PagedIterable}.
     */
    PagedIterable<KeyVaultKey> listKeyVaultKeys(
        String resourceGroupName,
        String integrationAccountName,
        ListKeyVaultKeysDefinition listKeyVaultKeys,
        Context context);

    /**
     * Logs the integration account's tracking events.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account name.
     * @param logTrackingEvents The callback URL parameters.
     * @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}.
     */
    Response<Void> logTrackingEventsWithResponse(
        String resourceGroupName,
        String integrationAccountName,
        TrackingEventsDefinition logTrackingEvents,
        Context context);

    /**
     * Logs the integration account's tracking events.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account name.
     * @param logTrackingEvents The callback URL parameters.
     * @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 logTrackingEvents(
        String resourceGroupName, String integrationAccountName, TrackingEventsDefinition logTrackingEvents);

    /**
     * Regenerates the integration account access key.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account name.
     * @param regenerateAccessKey The access key type.
     * @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 integration account along with {@link Response}.
     */
    Response<IntegrationAccount> regenerateAccessKeyWithResponse(
        String resourceGroupName,
        String integrationAccountName,
        RegenerateActionParameter regenerateAccessKey,
        Context context);

    /**
     * Regenerates the integration account access key.
     *
     * @param resourceGroupName The resource group name.
     * @param integrationAccountName The integration account name.
     * @param regenerateAccessKey The access key type.
     * @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 integration account.
     */
    IntegrationAccount regenerateAccessKey(
        String resourceGroupName, String integrationAccountName, RegenerateActionParameter regenerateAccessKey);

    /**
     * Gets an integration account.
     *
     * @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 an integration account along with {@link Response}.
     */
    IntegrationAccount getById(String id);

    /**
     * Gets an integration account.
     *
     * @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 an integration account along with {@link Response}.
     */
    Response<IntegrationAccount> getByIdWithResponse(String id, Context context);

    /**
     * Deletes an integration account.
     *
     * @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);

    /**
     * Deletes an integration account.
     *
     * @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 {@link Response}.
     */
    Response<Void> deleteByIdWithResponse(String id, Context context);

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