// 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.LocationResourceInner;
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.util.Context;

/**
 * An instance of this class provides access to all the operations defined in LocationResourcesClient.
 */
public interface LocationResourcesClient {
    /**
     * Get a LocationResource.
     * 
     * @param location The name of the Azure region.
     * @param locationResourceName The name of the LocationResource.
     * @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 LocationResource along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<LocationResourceInner> getWithResponse(String location, String locationResourceName, Context context);

    /**
     * Get a LocationResource.
     * 
     * @param location The name of the Azure region.
     * @param locationResourceName The name of the LocationResource.
     * @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 LocationResource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    LocationResourceInner get(String location, String locationResourceName);

    /**
     * Create a LocationResource.
     * 
     * @param location The name of the Azure region.
     * @param locationResourceName The name of the LocationResource.
     * @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 proxy resource types can be created by aliasing this type using a specific property type along
     * with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<LocationResourceInner> createOrUpdateWithResponse(String location, String locationResourceName,
        LocationResourceInner resource, Context context);

    /**
     * Create a LocationResource.
     * 
     * @param location The name of the Azure region.
     * @param locationResourceName The name of the LocationResource.
     * @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 proxy resource types can be created by aliasing this type using a specific property type.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    LocationResourceInner createOrUpdate(String location, String locationResourceName, LocationResourceInner resource);

    /**
     * Update a LocationResource.
     * 
     * @param location The name of the Azure region.
     * @param locationResourceName The name of the LocationResource.
     * @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 proxy resource types can be created by aliasing this type using a specific property type along
     * with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<LocationResourceInner> updateWithResponse(String location, String locationResourceName,
        LocationResourceInner properties, Context context);

    /**
     * Update a LocationResource.
     * 
     * @param location The name of the Azure region.
     * @param locationResourceName The name of the LocationResource.
     * @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 proxy resource types can be created by aliasing this type using a specific property type.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    LocationResourceInner update(String location, String locationResourceName, LocationResourceInner properties);

    /**
     * Delete a LocationResource.
     * 
     * @param location The name of the Azure region.
     * @param locationResourceName The name of the LocationResource.
     * @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 location, String locationResourceName, Context context);

    /**
     * Delete a LocationResource.
     * 
     * @param location The name of the Azure region.
     * @param locationResourceName The name of the LocationResource.
     * @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 location, String locationResourceName);

    /**
     * List LocationResource resources by SubscriptionLocationResource.
     * 
     * @param location The name of the Azure region.
     * @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 LocationResource list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<LocationResourceInner> listByLocation(String location);

    /**
     * List LocationResource resources by SubscriptionLocationResource.
     * 
     * @param location The name of the Azure region.
     * @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 LocationResource list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<LocationResourceInner> listByLocation(String location, Context context);
}
