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

package com.azure.resourcemanager.extendedlocation.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 CustomLocations. */
public interface CustomLocations {
    /**
     * Lists all available Custom Locations operations.
     *
     * @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 lists of Custom Locations operations as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CustomLocationOperation> listOperations();

    /**
     * Lists all available Custom Locations operations.
     *
     * @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 lists of Custom Locations operations as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CustomLocationOperation> listOperations(Context context);

    /**
     * Gets a list of Custom Locations in the specified subscription. The operation returns properties of each Custom
     * Location.
     *
     * @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 Locations in the specified subscription as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<CustomLocation> list();

    /**
     * Gets a list of Custom Locations in the specified subscription. The operation returns properties of each Custom
     * Location.
     *
     * @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 Locations in the specified subscription as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<CustomLocation> list(Context context);

    /**
     * Gets a list of Custom Locations in the specified subscription and resource group. The operation returns
     * properties of each Custom Location.
     *
     * @param resourceGroupName The name of the resource group. 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 Locations in the specified subscription and resource group as paginated response with
     *     {@link PagedIterable}.
     */
    PagedIterable<CustomLocation> listByResourceGroup(String resourceGroupName);

    /**
     * Gets a list of Custom Locations in the specified subscription and resource group. The operation returns
     * properties of each Custom Location.
     *
     * @param resourceGroupName The name of the resource group. 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 Locations in the specified subscription and resource group as paginated response with
     *     {@link PagedIterable}.
     */
    PagedIterable<CustomLocation> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Gets the details of the customLocation with a specified resource group and name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceName Custom Locations 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 details of the customLocation with a specified resource group and name.
     */
    CustomLocation getByResourceGroup(String resourceGroupName, String resourceName);

    /**
     * Gets the details of the customLocation with a specified resource group and name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceName Custom Locations 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 details of the customLocation with a specified resource group and name along with {@link Response}.
     */
    Response<CustomLocation> getByResourceGroupWithResponse(
        String resourceGroupName, String resourceName, Context context);

    /**
     * Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceName Custom Locations 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.
     */
    void deleteByResourceGroup(String resourceGroupName, String resourceName);

    /**
     * Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceName Custom Locations 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.
     */
    void delete(String resourceGroupName, String resourceName, Context context);

    /**
     * Gets the list of the Enabled Resource Types.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceName Custom Locations 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 list of the Enabled Resource Types as paginated response with {@link PagedIterable}.
     */
    PagedIterable<EnabledResourceType> listEnabledResourceTypes(String resourceGroupName, String resourceName);

    /**
     * Gets the list of the Enabled Resource Types.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceName Custom Locations 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 list of the Enabled Resource Types as paginated response with {@link PagedIterable}.
     */
    PagedIterable<EnabledResourceType> listEnabledResourceTypes(
        String resourceGroupName, String resourceName, Context context);

    /**
     * Returns the target resource group associated with the resource sync rules of the Custom Location that match the
     * rules passed in with the Find Target Resource Group Request.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceName Custom Locations name.
     * @param parameters Parameters of the find target resource group request.
     * @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 Find Target Resource Group operation response.
     */
    CustomLocationFindTargetResourceGroupResult findTargetResourceGroup(
        String resourceGroupName, String resourceName, CustomLocationFindTargetResourceGroupProperties parameters);

    /**
     * Returns the target resource group associated with the resource sync rules of the Custom Location that match the
     * rules passed in with the Find Target Resource Group Request.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceName Custom Locations name.
     * @param parameters Parameters of the find target resource group request.
     * @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 Find Target Resource Group operation response along with {@link Response}.
     */
    Response<CustomLocationFindTargetResourceGroupResult> findTargetResourceGroupWithResponse(
        String resourceGroupName,
        String resourceName,
        CustomLocationFindTargetResourceGroupProperties parameters,
        Context context);

    /**
     * Gets the details of the customLocation with a specified resource group and name.
     *
     * @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 the details of the customLocation with a specified resource group and name along with {@link Response}.
     */
    CustomLocation getById(String id);

    /**
     * Gets the details of the customLocation with a specified resource group and name.
     *
     * @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 details of the customLocation with a specified resource group and name along with {@link Response}.
     */
    Response<CustomLocation> getByIdWithResponse(String id, Context context);

    /**
     * Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id.
     *
     * @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);

    /**
     * Deletes the Custom Location with the specified Resource Name, Resource Group, and Subscription Id.
     *
     * @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.
     */
    void deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new CustomLocation resource.
     *
     * @param name resource name.
     * @return the first stage of the new CustomLocation definition.
     */
    CustomLocation.DefinitionStages.Blank define(String name);
}
