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

package com.azure.resourcemanager.security.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 CustomEntityStoreAssignments. */
public interface CustomEntityStoreAssignments {
    /**
     * Gets a custom entity store assignment
     *
     * <p>Gets a single custom entity store assignment by name for the provided subscription and resource group.
     *
     * @param resourceGroupName The name of the resource group within the user's subscription. The name is case
     *     insensitive.
     * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID.
     * @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 single custom entity store assignment by name for the provided subscription and resource group along
     *     with {@link Response}.
     */
    Response<CustomEntityStoreAssignment> getByResourceGroupWithResponse(
        String resourceGroupName, String customEntityStoreAssignmentName, Context context);

    /**
     * Gets a custom entity store assignment
     *
     * <p>Gets a single custom entity store assignment by name for the provided subscription and resource group.
     *
     * @param resourceGroupName The name of the resource group within the user's subscription. The name is case
     *     insensitive.
     * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID.
     * @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 single custom entity store assignment by name for the provided subscription and resource group.
     */
    CustomEntityStoreAssignment getByResourceGroup(String resourceGroupName, String customEntityStoreAssignmentName);

    /**
     * Deleted a custom entity store assignment
     *
     * <p>Delete a custom entity store assignment by name for a provided subscription.
     *
     * @param resourceGroupName The name of the resource group within the user's subscription. The name is case
     *     insensitive.
     * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID.
     * @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 customEntityStoreAssignmentName, Context context);

    /**
     * Deleted a custom entity store assignment
     *
     * <p>Delete a custom entity store assignment by name for a provided subscription.
     *
     * @param resourceGroupName The name of the resource group within the user's subscription. The name is case
     *     insensitive.
     * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID.
     * @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 customEntityStoreAssignmentName);

    /**
     * List custom entity store assignments in a subscription and a resource group
     *
     * <p>List custom entity store assignments by a provided subscription and resource group.
     *
     * @param resourceGroupName The name of the resource group within the user's subscription. The name is case
     *     insensitive.
     * @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 custom entity store assignments as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CustomEntityStoreAssignment> listByResourceGroup(String resourceGroupName);

    /**
     * List custom entity store assignments in a subscription and a resource group
     *
     * <p>List custom entity store assignments by a provided subscription and resource group.
     *
     * @param resourceGroupName The name of the resource group within the user's subscription. The name is case
     *     insensitive.
     * @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 custom entity store assignments as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CustomEntityStoreAssignment> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * List custom entity store assignments in a subscription
     *
     * <p>List custom entity store assignments by provided 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 custom entity store assignments as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CustomEntityStoreAssignment> list();

    /**
     * List custom entity store assignments in a subscription
     *
     * <p>List custom entity store assignments by provided subscription.
     *
     * @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 custom entity store assignments as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CustomEntityStoreAssignment> list(Context context);

    /**
     * Gets a custom entity store assignment
     *
     * <p>Gets a single custom entity store assignment by name for the provided subscription and resource group.
     *
     * @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 a single custom entity store assignment by name for the provided subscription and resource group along
     *     with {@link Response}.
     */
    CustomEntityStoreAssignment getById(String id);

    /**
     * Gets a custom entity store assignment
     *
     * <p>Gets a single custom entity store assignment by name for the provided subscription and resource group.
     *
     * @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 a single custom entity store assignment by name for the provided subscription and resource group along
     *     with {@link Response}.
     */
    Response<CustomEntityStoreAssignment> getByIdWithResponse(String id, Context context);

    /**
     * Deleted a custom entity store assignment
     *
     * <p>Delete a custom entity store assignment by name for a provided subscription.
     *
     * @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);

    /**
     * Deleted a custom entity store assignment
     *
     * <p>Delete a custom entity store assignment by name for a provided subscription.
     *
     * @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 CustomEntityStoreAssignment resource.
     *
     * @param name resource name.
     * @return the first stage of the new CustomEntityStoreAssignment definition.
     */
    CustomEntityStoreAssignment.DefinitionStages.Blank define(String name);
}
