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

package com.azure.resourcemanager.operationsmanagement.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.operationsmanagement.fluent.models.ManagementAssociationInner;
import com.azure.resourcemanager.operationsmanagement.fluent.models.ManagementAssociationPropertiesListInner;

/** An instance of this class provides access to all the operations defined in ManagementAssociationsClient. */
public interface ManagementAssociationsClient {
    /**
     * Retrieves the ManagementAssociations list for the subscription
     *
     * <p>Retrieves the ManagementAssociations list.
     *
     * @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 list of ManagementAssociation response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ManagementAssociationPropertiesListInner> listBySubscriptionWithResponse(Context context);

    /**
     * Retrieves the ManagementAssociations list for the subscription
     *
     * <p>Retrieves the ManagementAssociations list.
     *
     * @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 list of ManagementAssociation response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ManagementAssociationPropertiesListInner listBySubscription();

    /**
     * Create/Update ManagementAssociation.
     *
     * <p>Creates or updates the ManagementAssociation.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param providerName Provider name for the parent resource.
     * @param resourceType Resource type for the parent resource.
     * @param resourceName Parent resource name.
     * @param managementAssociationName User ManagementAssociation Name.
     * @param parameters The parameters required to create ManagementAssociation extension.
     * @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 container for solution along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ManagementAssociationInner> createOrUpdateWithResponse(
        String resourceGroupName,
        String providerName,
        String resourceType,
        String resourceName,
        String managementAssociationName,
        ManagementAssociationInner parameters,
        Context context);

    /**
     * Create/Update ManagementAssociation.
     *
     * <p>Creates or updates the ManagementAssociation.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param providerName Provider name for the parent resource.
     * @param resourceType Resource type for the parent resource.
     * @param resourceName Parent resource name.
     * @param managementAssociationName User ManagementAssociation Name.
     * @param parameters The parameters required to create ManagementAssociation extension.
     * @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 container for solution.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ManagementAssociationInner createOrUpdate(
        String resourceGroupName,
        String providerName,
        String resourceType,
        String resourceName,
        String managementAssociationName,
        ManagementAssociationInner parameters);

    /**
     * Deletes the ManagementAssociation
     *
     * <p>Deletes the ManagementAssociation in the subscription.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param providerName Provider name for the parent resource.
     * @param resourceType Resource type for the parent resource.
     * @param resourceName Parent resource name.
     * @param managementAssociationName User ManagementAssociation 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(
        String resourceGroupName,
        String providerName,
        String resourceType,
        String resourceName,
        String managementAssociationName,
        Context context);

    /**
     * Deletes the ManagementAssociation
     *
     * <p>Deletes the ManagementAssociation in the subscription.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param providerName Provider name for the parent resource.
     * @param resourceType Resource type for the parent resource.
     * @param resourceName Parent resource name.
     * @param managementAssociationName User ManagementAssociation 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(
        String resourceGroupName,
        String providerName,
        String resourceType,
        String resourceName,
        String managementAssociationName);

    /**
     * Retrieve ManagementAssociation.
     *
     * <p>Retrieves the user ManagementAssociation.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param providerName Provider name for the parent resource.
     * @param resourceType Resource type for the parent resource.
     * @param resourceName Parent resource name.
     * @param managementAssociationName User ManagementAssociation 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 container for solution along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ManagementAssociationInner> getWithResponse(
        String resourceGroupName,
        String providerName,
        String resourceType,
        String resourceName,
        String managementAssociationName,
        Context context);

    /**
     * Retrieve ManagementAssociation.
     *
     * <p>Retrieves the user ManagementAssociation.
     *
     * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
     * @param providerName Provider name for the parent resource.
     * @param resourceType Resource type for the parent resource.
     * @param resourceName Parent resource name.
     * @param managementAssociationName User ManagementAssociation 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 the container for solution.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ManagementAssociationInner get(
        String resourceGroupName,
        String providerName,
        String resourceType,
        String resourceName,
        String managementAssociationName);
}
