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

package com.azure.resourcemanager.servicefabric.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.servicefabric.fluent.models.ApplicationTypeVersionResourceInner;
import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceListInner;

/** An instance of this class provides access to all the operations defined in ApplicationTypeVersionsClient. */
public interface ApplicationTypeVersionsClient {
    /**
     * Gets a Service Fabric application type version resource.
     *
     * <p>Get a Service Fabric application type version resource created or in the process of being created in the
     * Service Fabric application type name resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @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 Service Fabric application type version resource created or in the process of being created in the
     *     Service Fabric application type name resource along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ApplicationTypeVersionResourceInner> getWithResponse(
        String resourceGroupName, String clusterName, String applicationTypeName, String version, Context context);

    /**
     * Gets a Service Fabric application type version resource.
     *
     * <p>Get a Service Fabric application type version resource created or in the process of being created in the
     * Service Fabric application type name resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @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 Service Fabric application type version resource created or in the process of being created in the
     *     Service Fabric application type name resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ApplicationTypeVersionResourceInner get(
        String resourceGroupName, String clusterName, String applicationTypeName, String version);

    /**
     * Creates or updates a Service Fabric application type version resource.
     *
     * <p>Create or update a Service Fabric application type version resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @param parameters The application type version 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 the {@link SyncPoller} for polling of an application type version resource for the specified application
     *     type name resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ApplicationTypeVersionResourceInner>, ApplicationTypeVersionResourceInner>
        beginCreateOrUpdate(
            String resourceGroupName,
            String clusterName,
            String applicationTypeName,
            String version,
            ApplicationTypeVersionResourceInner parameters);

    /**
     * Creates or updates a Service Fabric application type version resource.
     *
     * <p>Create or update a Service Fabric application type version resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @param parameters The application type version 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 the {@link SyncPoller} for polling of an application type version resource for the specified application
     *     type name resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ApplicationTypeVersionResourceInner>, ApplicationTypeVersionResourceInner>
        beginCreateOrUpdate(
            String resourceGroupName,
            String clusterName,
            String applicationTypeName,
            String version,
            ApplicationTypeVersionResourceInner parameters,
            Context context);

    /**
     * Creates or updates a Service Fabric application type version resource.
     *
     * <p>Create or update a Service Fabric application type version resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @param parameters The application type version 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 application type version resource for the specified application type name resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ApplicationTypeVersionResourceInner createOrUpdate(
        String resourceGroupName,
        String clusterName,
        String applicationTypeName,
        String version,
        ApplicationTypeVersionResourceInner parameters);

    /**
     * Creates or updates a Service Fabric application type version resource.
     *
     * <p>Create or update a Service Fabric application type version resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @param parameters The application type version 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 application type version resource for the specified application type name resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ApplicationTypeVersionResourceInner createOrUpdate(
        String resourceGroupName,
        String clusterName,
        String applicationTypeName,
        String version,
        ApplicationTypeVersionResourceInner parameters,
        Context context);

    /**
     * Deletes a Service Fabric application type version resource.
     *
     * <p>Delete a Service Fabric application type version resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @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 clusterName, String applicationTypeName, String version);

    /**
     * Deletes a Service Fabric application type version resource.
     *
     * <p>Delete a Service Fabric application type version resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @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 clusterName, String applicationTypeName, String version, Context context);

    /**
     * Deletes a Service Fabric application type version resource.
     *
     * <p>Delete a Service Fabric application type version resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @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 clusterName, String applicationTypeName, String version);

    /**
     * Deletes a Service Fabric application type version resource.
     *
     * <p>Delete a Service Fabric application type version resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name resource.
     * @param version The application type version.
     * @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 clusterName, String applicationTypeName, String version, Context context);

    /**
     * Gets the list of application type version resources created in the specified Service Fabric application type name
     * resource.
     *
     * <p>Gets all application type version resources created or in the process of being created in the Service Fabric
     * application type name resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name 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 all application type version resources created or in the process of being created in the Service Fabric
     *     application type name resource along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ApplicationTypeVersionResourceListInner> listWithResponse(
        String resourceGroupName, String clusterName, String applicationTypeName, Context context);

    /**
     * Gets the list of application type version resources created in the specified Service Fabric application type name
     * resource.
     *
     * <p>Gets all application type version resources created or in the process of being created in the Service Fabric
     * application type name resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationTypeName The name of the application type name 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 all application type version resources created or in the process of being created in the Service Fabric
     *     application type name resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ApplicationTypeVersionResourceListInner list(
        String resourceGroupName, String clusterName, String applicationTypeName);
}
