// 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.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.logic.fluent.models.IntegrationAccountInner;
import java.util.Map;

/** An immutable client-side representation of IntegrationAccount. */
public interface IntegrationAccount {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the location property: The geo-location where the resource lives.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the tags property: Resource tags.
     *
     * @return the tags value.
     */
    Map<String, String> tags();

    /**
     * Gets the sku property: The sku.
     *
     * @return the sku value.
     */
    IntegrationAccountSku sku();

    /**
     * Gets the integrationServiceEnvironment property: The integration service environment.
     *
     * @return the integrationServiceEnvironment value.
     */
    ResourceReference integrationServiceEnvironment();

    /**
     * Gets the state property: The workflow state.
     *
     * @return the state value.
     */
    WorkflowState state();

    /**
     * Gets the region of the resource.
     *
     * @return the region of the resource.
     */
    Region region();

    /**
     * Gets the name of the resource region.
     *
     * @return the name of the resource region.
     */
    String regionName();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.logic.fluent.models.IntegrationAccountInner object.
     *
     * @return the inner object.
     */
    IntegrationAccountInner innerModel();

    /** The entirety of the IntegrationAccount definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithCreate {
    }
    /** The IntegrationAccount definition stages. */
    interface DefinitionStages {
        /** The first stage of the IntegrationAccount definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the IntegrationAccount definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(String location);
        }
        /** The stage of the IntegrationAccount definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The resource group name.
             * @return the next definition stage.
             */
            WithCreate withExistingResourceGroup(String resourceGroupName);
        }
        /**
         * The stage of the IntegrationAccount definition which contains all the minimum required properties for the
         * resource to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithTags,
                DefinitionStages.WithSku,
                DefinitionStages.WithIntegrationServiceEnvironment,
                DefinitionStages.WithState {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            IntegrationAccount create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            IntegrationAccount create(Context context);
        }
        /** The stage of the IntegrationAccount definition allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            WithCreate withTags(Map<String, String> tags);
        }
        /** The stage of the IntegrationAccount definition allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: The sku..
             *
             * @param sku The sku.
             * @return the next definition stage.
             */
            WithCreate withSku(IntegrationAccountSku sku);
        }
        /** The stage of the IntegrationAccount definition allowing to specify integrationServiceEnvironment. */
        interface WithIntegrationServiceEnvironment {
            /**
             * Specifies the integrationServiceEnvironment property: The integration service environment..
             *
             * @param integrationServiceEnvironment The integration service environment.
             * @return the next definition stage.
             */
            WithCreate withIntegrationServiceEnvironment(ResourceReference integrationServiceEnvironment);
        }
        /** The stage of the IntegrationAccount definition allowing to specify state. */
        interface WithState {
            /**
             * Specifies the state property: The workflow state..
             *
             * @param state The workflow state.
             * @return the next definition stage.
             */
            WithCreate withState(WorkflowState state);
        }
    }
    /**
     * Begins update for the IntegrationAccount resource.
     *
     * @return the stage of resource update.
     */
    IntegrationAccount.Update update();

    /** The template for IntegrationAccount update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithSku,
            UpdateStages.WithIntegrationServiceEnvironment,
            UpdateStages.WithState {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        IntegrationAccount apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        IntegrationAccount apply(Context context);
    }
    /** The IntegrationAccount update stages. */
    interface UpdateStages {
        /** The stage of the IntegrationAccount update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the IntegrationAccount update allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: The sku..
             *
             * @param sku The sku.
             * @return the next definition stage.
             */
            Update withSku(IntegrationAccountSku sku);
        }
        /** The stage of the IntegrationAccount update allowing to specify integrationServiceEnvironment. */
        interface WithIntegrationServiceEnvironment {
            /**
             * Specifies the integrationServiceEnvironment property: The integration service environment..
             *
             * @param integrationServiceEnvironment The integration service environment.
             * @return the next definition stage.
             */
            Update withIntegrationServiceEnvironment(ResourceReference integrationServiceEnvironment);
        }
        /** The stage of the IntegrationAccount update allowing to specify state. */
        interface WithState {
            /**
             * Specifies the state property: The workflow state..
             *
             * @param state The workflow state.
             * @return the next definition stage.
             */
            Update withState(WorkflowState state);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    IntegrationAccount refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    IntegrationAccount refresh(Context context);

    /**
     * Gets the integration account callback URL.
     *
     * @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(GetCallbackUrlParameters parameters, Context context);

    /**
     * Gets the integration account callback URL.
     *
     * @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(GetCallbackUrlParameters parameters);

    /**
     * Gets the integration account's Key Vault keys.
     *
     * @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(ListKeyVaultKeysDefinition listKeyVaultKeys);

    /**
     * Gets the integration account's Key Vault keys.
     *
     * @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(ListKeyVaultKeysDefinition listKeyVaultKeys, Context context);

    /**
     * Logs the integration account's tracking events.
     *
     * @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(TrackingEventsDefinition logTrackingEvents, Context context);

    /**
     * Logs the integration account's tracking events.
     *
     * @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(TrackingEventsDefinition logTrackingEvents);

    /**
     * Regenerates the integration account access key.
     *
     * @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(
        RegenerateActionParameter regenerateAccessKey, Context context);

    /**
     * Regenerates the integration account access key.
     *
     * @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(RegenerateActionParameter regenerateAccessKey);
}
