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

package com.azure.resourcemanager.devcenter.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.devcenter.fluent.models.DevBoxDefinitionInner;
import com.azure.resourcemanager.devcenter.models.DevBoxDefinitionUpdate;

/** An instance of this class provides access to all the operations defined in DevBoxDefinitionsClient. */
public interface DevBoxDefinitionsClient {
    /**
     * List Dev Box definitions for a devcenter.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<DevBoxDefinitionInner> listByDevCenter(String resourceGroupName, String devCenterName);

    /**
     * List Dev Box definitions for a devcenter.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param top The maximum number of resources to return from the operation. Example: '$top=10'.
     * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<DevBoxDefinitionInner> listByDevCenter(
        String resourceGroupName, String devCenterName, Integer top, Context context);

    /**
     * Gets a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @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 Dev Box definition along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<DevBoxDefinitionInner> getWithResponse(
        String resourceGroupName, String devCenterName, String devBoxDefinitionName, Context context);

    /**
     * Gets a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @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 Dev Box definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DevBoxDefinitionInner get(String resourceGroupName, String devCenterName, String devBoxDefinitionName);

    /**
     * Creates or updates a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @param body Represents a Dev Box definition.
     * @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 represents a definition for a Developer Machine.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DevBoxDefinitionInner>, DevBoxDefinitionInner> beginCreateOrUpdate(
        String resourceGroupName, String devCenterName, String devBoxDefinitionName, DevBoxDefinitionInner body);

    /**
     * Creates or updates a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @param body Represents a Dev Box definition.
     * @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 represents a definition for a Developer Machine.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DevBoxDefinitionInner>, DevBoxDefinitionInner> beginCreateOrUpdate(
        String resourceGroupName,
        String devCenterName,
        String devBoxDefinitionName,
        DevBoxDefinitionInner body,
        Context context);

    /**
     * Creates or updates a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @param body Represents a Dev Box definition.
     * @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 represents a definition for a Developer Machine.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DevBoxDefinitionInner createOrUpdate(
        String resourceGroupName, String devCenterName, String devBoxDefinitionName, DevBoxDefinitionInner body);

    /**
     * Creates or updates a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @param body Represents a Dev Box definition.
     * @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 represents a definition for a Developer Machine.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DevBoxDefinitionInner createOrUpdate(
        String resourceGroupName,
        String devCenterName,
        String devBoxDefinitionName,
        DevBoxDefinitionInner body,
        Context context);

    /**
     * Partially updates a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @param body Represents a Dev Box definition.
     * @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 represents a definition for a Developer Machine.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DevBoxDefinitionInner>, DevBoxDefinitionInner> beginUpdate(
        String resourceGroupName, String devCenterName, String devBoxDefinitionName, DevBoxDefinitionUpdate body);

    /**
     * Partially updates a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @param body Represents a Dev Box definition.
     * @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 represents a definition for a Developer Machine.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DevBoxDefinitionInner>, DevBoxDefinitionInner> beginUpdate(
        String resourceGroupName,
        String devCenterName,
        String devBoxDefinitionName,
        DevBoxDefinitionUpdate body,
        Context context);

    /**
     * Partially updates a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @param body Represents a Dev Box definition.
     * @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 represents a definition for a Developer Machine.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DevBoxDefinitionInner update(
        String resourceGroupName, String devCenterName, String devBoxDefinitionName, DevBoxDefinitionUpdate body);

    /**
     * Partially updates a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @param body Represents a Dev Box definition.
     * @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 represents a definition for a Developer Machine.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DevBoxDefinitionInner update(
        String resourceGroupName,
        String devCenterName,
        String devBoxDefinitionName,
        DevBoxDefinitionUpdate body,
        Context context);

    /**
     * Deletes a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @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> beginDelete(
        String resourceGroupName, String devCenterName, String devBoxDefinitionName);

    /**
     * Deletes a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @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> beginDelete(
        String resourceGroupName, String devCenterName, String devBoxDefinitionName, Context context);

    /**
     * Deletes a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @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 devCenterName, String devBoxDefinitionName);

    /**
     * Deletes a Dev Box definition.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param devCenterName The name of the devcenter.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @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 devCenterName, String devBoxDefinitionName, Context context);

    /**
     * List Dev Box definitions configured for a project.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param projectName The name of the project.
     * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<DevBoxDefinitionInner> listByProject(String resourceGroupName, String projectName);

    /**
     * List Dev Box definitions configured for a project.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param projectName The name of the project.
     * @param top The maximum number of resources to return from the operation. Example: '$top=10'.
     * @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 results of the Dev Box definition list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<DevBoxDefinitionInner> listByProject(
        String resourceGroupName, String projectName, Integer top, Context context);

    /**
     * Gets a Dev Box definition configured for a project.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param projectName The name of the project.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @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 Dev Box definition configured for a project along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<DevBoxDefinitionInner> getByProjectWithResponse(
        String resourceGroupName, String projectName, String devBoxDefinitionName, Context context);

    /**
     * Gets a Dev Box definition configured for a project.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param projectName The name of the project.
     * @param devBoxDefinitionName The name of the Dev Box definition.
     * @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 Dev Box definition configured for a project.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DevBoxDefinitionInner getByProject(String resourceGroupName, String projectName, String devBoxDefinitionName);
}
