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

package com.azure.resourcemanager.servicenetworking.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
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.servicenetworking.fluent.models.AssociationInner;
import com.azure.resourcemanager.servicenetworking.models.AssociationUpdate;

/** An instance of this class provides access to all the operations defined in AssociationsInterfacesClient. */
public interface AssociationsInterfacesClient {
    /**
     * List Association resources by TrafficController.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @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 a Association list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AssociationInner> listByTrafficController(String resourceGroupName, String trafficControllerName);

    /**
     * List Association resources by TrafficController.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @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 a Association list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AssociationInner> listByTrafficController(
        String resourceGroupName, String trafficControllerName, Context context);

    /**
     * Get a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @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 Association along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AssociationInner> getWithResponse(
        String resourceGroupName, String trafficControllerName, String associationName, Context context);

    /**
     * Get a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @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 Association.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AssociationInner get(String resourceGroupName, String trafficControllerName, String associationName);

    /**
     * Create a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @param resource Resource create 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 {@link SyncPoller} for polling of association Subresource of Traffic Controller.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<AssociationInner>, AssociationInner> beginCreateOrUpdate(
        String resourceGroupName, String trafficControllerName, String associationName, AssociationInner resource);

    /**
     * Create a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @param resource Resource create 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 SyncPoller} for polling of association Subresource of Traffic Controller.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<AssociationInner>, AssociationInner> beginCreateOrUpdate(
        String resourceGroupName,
        String trafficControllerName,
        String associationName,
        AssociationInner resource,
        Context context);

    /**
     * Create a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @param resource Resource create 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 association Subresource of Traffic Controller.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AssociationInner createOrUpdate(
        String resourceGroupName, String trafficControllerName, String associationName, AssociationInner resource);

    /**
     * Create a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @param resource Resource create 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 association Subresource of Traffic Controller.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AssociationInner createOrUpdate(
        String resourceGroupName,
        String trafficControllerName,
        String associationName,
        AssociationInner resource,
        Context context);

    /**
     * Update a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @param properties The resource properties to be updated.
     * @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 association Subresource of Traffic Controller along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AssociationInner> updateWithResponse(
        String resourceGroupName,
        String trafficControllerName,
        String associationName,
        AssociationUpdate properties,
        Context context);

    /**
     * Update a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @param properties The resource properties to be updated.
     * @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 association Subresource of Traffic Controller.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AssociationInner update(
        String resourceGroupName, String trafficControllerName, String associationName, AssociationUpdate properties);

    /**
     * Delete a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @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 trafficControllerName, String associationName);

    /**
     * Delete a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @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 trafficControllerName, String associationName, Context context);

    /**
     * Delete a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @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 trafficControllerName, String associationName);

    /**
     * Delete a Association.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param trafficControllerName traffic controller name for path.
     * @param associationName Name of Association.
     * @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 trafficControllerName, String associationName, Context context);
}
