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

package azure.resourcemanager.resources.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 ExtensionsResources.
 */
public interface ExtensionsResources {
    /**
     * Get a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 ExtensionsResource along with {@link Response}.
     */
    Response<ExtensionsResource> getWithResponse(String resourceUri, String extensionsResourceName, Context context);

    /**
     * Get a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 ExtensionsResource.
     */
    ExtensionsResource get(String resourceUri, String extensionsResourceName);

    /**
     * Delete a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 resourceUri, String extensionsResourceName,
        Context context);

    /**
     * Delete a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 resourceUri, String extensionsResourceName);

    /**
     * List ExtensionsResource resources by parent.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 response of a ExtensionsResource list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<ExtensionsResource> listByScope(String resourceUri);

    /**
     * List ExtensionsResource resources by parent.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 response of a ExtensionsResource list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<ExtensionsResource> listByScope(String resourceUri, Context context);

    /**
     * Get a ExtensionsResource.
     * 
     * @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 ExtensionsResource along with {@link Response}.
     */
    ExtensionsResource getById(String id);

    /**
     * Get a ExtensionsResource.
     * 
     * @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 ExtensionsResource along with {@link Response}.
     */
    Response<ExtensionsResource> getByIdWithResponse(String id, Context context);

    /**
     * Delete a ExtensionsResource.
     * 
     * @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);

    /**
     * Delete a ExtensionsResource.
     * 
     * @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 ExtensionsResource resource.
     * 
     * @param name resource name.
     * @return the first stage of the new ExtensionsResource definition.
     */
    ExtensionsResource.DefinitionStages.Blank define(String name);
}
