// 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.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.labservices.fluent.models.ScheduleInner;
import com.azure.resourcemanager.labservices.models.ScheduleUpdate;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in SchedulesClient. */
public interface SchedulesClient {
    /**
     * Returns a list of all schedules for a lab.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @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 schedules.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ScheduleInner> listByLab(String resourceGroupName, String labName);

    /**
     * Returns a list of all schedules for a lab.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @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 schedules.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ScheduleInner> listByLab(String resourceGroupName, String labName, String filter, Context context);

    /**
     * Returns the properties of a lab Schedule.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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 schedule for automatically turning virtual machines in a lab on and off at specified times.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduleInner get(String resourceGroupName, String labName, String scheduleName);

    /**
     * Returns the properties of a lab Schedule.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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 schedule for automatically turning virtual machines in a lab on and off at specified times along with
     *     {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ScheduleInner> getWithResponse(
        String resourceGroupName, String labName, String scheduleName, Context context);

    /**
     * Operation to create or update a lab schedule.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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 schedule for automatically turning virtual machines in a lab on and off at specified times.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduleInner createOrUpdate(String resourceGroupName, String labName, String scheduleName, ScheduleInner body);

    /**
     * Operation to create or update a lab schedule.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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 schedule for automatically turning virtual machines in a lab on and off at specified times along with
     *     {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ScheduleInner> createOrUpdateWithResponse(
        String resourceGroupName, String labName, String scheduleName, ScheduleInner body, Context context);

    /**
     * Operation to update a lab schedule.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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 schedule for automatically turning virtual machines in a lab on and off at specified times.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduleInner update(String resourceGroupName, String labName, String scheduleName, ScheduleUpdate body);

    /**
     * Operation to update a lab schedule.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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 schedule for automatically turning virtual machines in a lab on and off at specified times along with
     *     {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ScheduleInner> updateWithResponse(
        String resourceGroupName, String labName, String scheduleName, ScheduleUpdate body, Context context);

    /**
     * Operation to delete a schedule resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String labName, String scheduleName);

    /**
     * Operation to delete a schedule resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String labName, String scheduleName, Context context);

    /**
     * Operation to delete a schedule resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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 resourceGroupName, String labName, String scheduleName);

    /**
     * Operation to delete a schedule resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource
     *     URIs.
     * @param scheduleName The name of the schedule that uniquely identifies it within containing lab. Used in resource
     *     URIs.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String labName, String scheduleName, Context context);
}
