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

package com.azure.resourcemanager.devtestlabs.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.devtestlabs.fluent.models.ScheduleInner;
import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment;

/** An instance of this class provides access to all the operations defined in ServiceFabricSchedulesClient. */
public interface ServiceFabricSchedulesClient {
    /**
     * List schedules in a given service fabric.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @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 list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ScheduleInner> list(
        String resourceGroupName, String labName, String username, String serviceFabricName);

    /**
     * List schedules in a given service fabric.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param expand Specify the $expand query. Example: 'properties($select=status)'.
     * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
     * @param top The maximum number of resources to return from the operation. Example: '$top=10'.
     * @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
     * @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 list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ScheduleInner> list(
        String resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String expand,
        String filter,
        Integer top,
        String orderby,
        Context context);

    /**
     * Get schedule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @param expand Specify the $expand query. Example: 'properties($select=status)'.
     * @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 along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ScheduleInner> getWithResponse(
        String resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String name,
        String expand,
        Context context);

    /**
     * Get schedule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduleInner get(String resourceGroupName, String labName, String username, String serviceFabricName, String name);

    /**
     * Create or replace an existing schedule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @param schedule A schedule.
     * @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 schedule along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ScheduleInner> createOrUpdateWithResponse(
        String resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String name,
        ScheduleInner schedule,
        Context context);

    /**
     * Create or replace an existing schedule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @param schedule A schedule.
     * @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 schedule.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduleInner createOrUpdate(
        String resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String name,
        ScheduleInner schedule);

    /**
     * Delete schedule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @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 resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String name,
        Context context);

    /**
     * Delete schedule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @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 username, String serviceFabricName, String name);

    /**
     * Allows modifying tags of schedules. All other properties will be ignored.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @param schedule A schedule.
     * @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 schedule along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ScheduleInner> updateWithResponse(
        String resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String name,
        ScheduleFragment schedule,
        Context context);

    /**
     * Allows modifying tags of schedules. All other properties will be ignored.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @param schedule A schedule.
     * @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 schedule.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduleInner update(
        String resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String name,
        ScheduleFragment schedule);

    /**
     * Execute a schedule. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @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 long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginExecute(
        String resourceGroupName, String labName, String username, String serviceFabricName, String name);

    /**
     * Execute a schedule. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @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 long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginExecute(
        String resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String name,
        Context context);

    /**
     * Execute a schedule. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @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 execute(String resourceGroupName, String labName, String username, String serviceFabricName, String name);

    /**
     * Execute a schedule. This operation can take a while to complete.
     *
     * @param resourceGroupName The name of the resource group.
     * @param labName The name of the lab.
     * @param username The name of the user profile.
     * @param serviceFabricName The name of the service fabric.
     * @param name The name of the schedule.
     * @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 execute(
        String resourceGroupName,
        String labName,
        String username,
        String serviceFabricName,
        String name,
        Context context);
}
