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

package azure.resourcemanager.resources.fluent;

import azure.resourcemanager.resources.fluent.models.ExtensionsResourceInner;
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;

/**
 * An instance of this class provides access to all the operations defined in ExtensionsResourcesClient.
 */
public interface ExtensionsResourcesClient {
    /**
     * 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ExtensionsResourceInner> 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ExtensionsResourceInner get(String resourceUri, String extensionsResourceName);

    /**
     * Create a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 concrete extension resource types can be created by aliasing this
     * type using a specific property type.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ExtensionsResourceInner>, ExtensionsResourceInner> beginCreateOrUpdate(String resourceUri,
        String extensionsResourceName, ExtensionsResourceInner resource);

    /**
     * Create a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 concrete extension resource types can be created by aliasing this
     * type using a specific property type.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ExtensionsResourceInner>, ExtensionsResourceInner> beginCreateOrUpdate(String resourceUri,
        String extensionsResourceName, ExtensionsResourceInner resource, Context context);

    /**
     * Create a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 concrete extension resource types can be created by aliasing this type using a specific property type.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ExtensionsResourceInner createOrUpdate(String resourceUri, String extensionsResourceName,
        ExtensionsResourceInner resource);

    /**
     * Create a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 concrete extension resource types can be created by aliasing this type using a specific property type.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ExtensionsResourceInner createOrUpdate(String resourceUri, String extensionsResourceName,
        ExtensionsResourceInner resource, Context context);

    /**
     * Update a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 concrete extension resource types can be created by aliasing this type using a specific property type
     * along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ExtensionsResourceInner> updateWithResponse(String resourceUri, String extensionsResourceName,
        ExtensionsResourceInner properties, Context context);

    /**
     * Update a ExtensionsResource.
     * 
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
     * @param extensionsResourceName The name of the ExtensionsResource.
     * @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 concrete extension resource types can be created by aliasing this type using a specific property type.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ExtensionsResourceInner update(String resourceUri, String extensionsResourceName,
        ExtensionsResourceInner properties);

    /**
     * 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(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}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ExtensionsResourceInner> 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}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ExtensionsResourceInner> listByScope(String resourceUri, Context context);
}
