// 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.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 LabPlans. */
public interface LabPlans {
    /**
     * Get all lab plans for a subscription.
     *
     * <p>Returns a list of all lab plans within a subscription.
     *
     * @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 paged list of lab plans as paginated response with {@link PagedIterable}.
     */
    PagedIterable<LabPlan> list();

    /**
     * Get all lab plans for a subscription.
     *
     * <p>Returns a list of all lab plans within a subscription.
     *
     * @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 paged list of lab plans as paginated response with {@link PagedIterable}.
     */
    PagedIterable<LabPlan> list(String filter, Context context);

    /**
     * Get all lab plans for a subscription and resource group.
     *
     * <p>Returns a list of all lab plans for a subscription and resource group.
     *
     * @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 paged list of lab plans as paginated response with {@link PagedIterable}.
     */
    PagedIterable<LabPlan> listByResourceGroup(String resourceGroupName);

    /**
     * Get all lab plans for a subscription and resource group.
     *
     * <p>Returns a list of all lab plans for a subscription and resource group.
     *
     * @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 paged list of lab plans as paginated response with {@link PagedIterable}.
     */
    PagedIterable<LabPlan> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Retrieves a Lab Plan resource.
     *
     * <p>Retrieves the properties of 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 lab Plans act as a permission container for creating labs via labs.azure.com.
     */
    LabPlan getByResourceGroup(String resourceGroupName, String labPlanName);

    /**
     * Retrieves a Lab Plan resource.
     *
     * <p>Retrieves the properties of 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 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 Plans act as a permission container for creating labs via labs.azure.com along with {@link Response}.
     */
    Response<LabPlan> getByResourceGroupWithResponse(String resourceGroupName, String labPlanName, Context context);

    /**
     * Deletes a Lab Plan resource.
     *
     * <p>Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated with a lab plan,
     * nor does it delete shared images added to a gallery via the lab plan permission container.
     *
     * @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.
     */
    void deleteByResourceGroup(String resourceGroupName, String labPlanName);

    /**
     * Deletes a Lab Plan resource.
     *
     * <p>Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated with a lab plan,
     * nor does it delete shared images added to a gallery via the lab plan permission container.
     *
     * @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 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 labPlanName, Context context);

    /**
     * Save an image from a lab VM to the attached shared image gallery.
     *
     * <p>Saves an image from a lab VM to the attached shared image gallery.
     *
     * @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 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.
     */
    void saveImage(String resourceGroupName, String labPlanName, SaveImageBody body);

    /**
     * Save an image from a lab VM to the attached shared image gallery.
     *
     * <p>Saves an image from a lab VM to the attached shared image gallery.
     *
     * @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 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.
     */
    void saveImage(String resourceGroupName, String labPlanName, SaveImageBody body, Context context);

    /**
     * Retrieves a Lab Plan resource.
     *
     * <p>Retrieves the properties of a Lab Plan.
     *
     * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response}.
     */
    LabPlan getById(String id);

    /**
     * Retrieves a Lab Plan resource.
     *
     * <p>Retrieves the properties of a Lab Plan.
     *
     * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response}.
     */
    Response<LabPlan> getByIdWithResponse(String id, Context context);

    /**
     * Deletes a Lab Plan resource.
     *
     * <p>Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated with a lab plan,
     * nor does it delete shared images added to a gallery via the lab plan permission container.
     *
     * @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 a Lab Plan resource.
     *
     * <p>Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated with a lab plan,
     * nor does it delete shared images added to a gallery via the lab plan permission container.
     *
     * @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 LabPlan resource.
     *
     * @param name resource name.
     * @return the first stage of the new LabPlan definition.
     */
    LabPlan.DefinitionStages.Blank define(String name);
}
