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

package com.azure.resourcemanager.labservices.fluent;

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;
import com.azure.resourcemanager.labservices.fluent.models.ImageInner;
import com.azure.resourcemanager.labservices.models.ImageUpdate;

/** An instance of this class provides access to all the operations defined in ImagesClient. */
public interface ImagesClient {
    /**
     * Gets all images.
     *
     * <p>Gets all images from galleries attached to a lab plan.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource group. Used in
     *     resource URIs and in UI.
     * @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 all images from galleries attached to a lab plan as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ImageInner> listByLabPlan(String resourceGroupName, String labPlanName);

    /**
     * Gets all images.
     *
     * <p>Gets all images from galleries attached to a lab plan.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource group. Used in
     *     resource URIs and in UI.
     * @param filter The filter to apply to the operation.
     * @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 all images from galleries attached to a lab plan as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ImageInner> listByLabPlan(
        String resourceGroupName, String labPlanName, String filter, Context context);

    /**
     * Gets an image.
     *
     * <p>Gets an image resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource group. Used in
     *     resource URIs and in UI.
     * @param imageName The image 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 an image resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ImageInner get(String resourceGroupName, String labPlanName, String imageName);

    /**
     * Gets an image.
     *
     * <p>Gets an image resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource group. Used in
     *     resource URIs and in UI.
     * @param imageName The image 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 an image resource along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ImageInner> getWithResponse(
        String resourceGroupName, String labPlanName, String imageName, Context context);

    /**
     * Updates an image via PUT.
     *
     * <p>Updates an image resource via PUT. Creating new resources via PUT will not function.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource group. Used in
     *     resource URIs and in UI.
     * @param imageName The image name.
     * @param body The request body.
     * @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 lab services virtual machine image.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ImageInner createOrUpdate(String resourceGroupName, String labPlanName, String imageName, ImageInner body);

    /**
     * Updates an image via PUT.
     *
     * <p>Updates an image resource via PUT. Creating new resources via PUT will not function.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource group. Used in
     *     resource URIs and in UI.
     * @param imageName The image name.
     * @param body The request body.
     * @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 lab services virtual machine image along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ImageInner> createOrUpdateWithResponse(
        String resourceGroupName, String labPlanName, String imageName, ImageInner body, Context context);

    /**
     * Updates an image.
     *
     * <p>Updates an image resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource group. Used in
     *     resource URIs and in UI.
     * @param imageName The image name.
     * @param body The request body.
     * @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 lab services virtual machine image.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ImageInner update(String resourceGroupName, String labPlanName, String imageName, ImageUpdate body);

    /**
     * Updates an image.
     *
     * <p>Updates an image resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource group. Used in
     *     resource URIs and in UI.
     * @param imageName The image name.
     * @param body The request body.
     * @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 lab services virtual machine image along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ImageInner> updateWithResponse(
        String resourceGroupName, String labPlanName, String imageName, ImageUpdate body, Context context);
}
