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

package com.azure.developer.devcenter;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.core.util.polling.SyncPoller;
import java.time.OffsetDateTime;

/** Initializes a new instance of the synchronous DevCenterClient type. */
@ServiceClient(builder = DevBoxesClientBuilder.class)
public final class DevBoxesClient {
    @Generated private final DevBoxesAsyncClient client;

    /**
     * Initializes an instance of DevBoxesClient class.
     *
     * @param client the async client.
     */
    @Generated
    DevBoxesClient(DevBoxesAsyncClient client) {
        this.client = client;
    }

    /**
     * Lists available pools.
     *
     * <p><strong>Query Parameters</strong>
     *
     * <table border="1">
     *     <caption>Query Parameters</caption>
     *     <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     *     <tr><td>top</td><td>Integer</td><td>No</td><td>The maximum number of resources to return from the operation. Example: 'top=10'.</td></tr>
     *     <tr><td>filter</td><td>String</td><td>No</td><td>An OData filter clause to apply to the operation.</td></tr>
     * </table>
     *
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     name: String (Optional)
     *     location: String (Optional)
     *     osType: String(Windows) (Optional)
     *     hardwareProfile (Optional): {
     *         skuName: String (Optional)
     *         vCPUs: Integer (Optional)
     *         memoryGB: Integer (Optional)
     *     }
     *     hibernateSupport: String(Disabled/Enabled) (Optional)
     *     storageProfile (Optional): {
     *         osDisk (Optional): {
     *             diskSizeGB: Integer (Optional)
     *         }
     *     }
     *     imageReference (Optional): {
     *         name: String (Optional)
     *         version: String (Optional)
     *         operatingSystem: String (Optional)
     *         osBuildNumber: String (Optional)
     *         publishedDate: OffsetDateTime (Optional)
     *     }
     *     localAdministrator: String(Enabled/Disabled) (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the Pool list result as paginated response with {@link PagedIterable}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<BinaryData> listPools(String projectName, RequestOptions requestOptions) {
        return new PagedIterable<>(this.client.listPools(projectName, requestOptions));
    }

    /**
     * Gets a pool.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     name: String (Optional)
     *     location: String (Optional)
     *     osType: String(Windows) (Optional)
     *     hardwareProfile (Optional): {
     *         skuName: String (Optional)
     *         vCPUs: Integer (Optional)
     *         memoryGB: Integer (Optional)
     *     }
     *     hibernateSupport: String(Disabled/Enabled) (Optional)
     *     storageProfile (Optional): {
     *         osDisk (Optional): {
     *             diskSizeGB: Integer (Optional)
     *         }
     *     }
     *     imageReference (Optional): {
     *         name: String (Optional)
     *         version: String (Optional)
     *         operatingSystem: String (Optional)
     *         osBuildNumber: String (Optional)
     *         publishedDate: OffsetDateTime (Optional)
     *     }
     *     localAdministrator: String(Enabled/Disabled) (Optional)
     * }
     * }</pre>
     *
     * @param poolName The name of a pool of Dev Boxes.
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return a pool along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getPoolWithResponse(
            String poolName, String projectName, RequestOptions requestOptions) {
        return this.client.getPoolWithResponse(poolName, projectName, requestOptions).block();
    }

    /**
     * Lists available schedules for a pool.
     *
     * <p><strong>Query Parameters</strong>
     *
     * <table border="1">
     *     <caption>Query Parameters</caption>
     *     <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     *     <tr><td>top</td><td>Integer</td><td>No</td><td>The maximum number of resources to return from the operation. Example: 'top=10'.</td></tr>
     *     <tr><td>filter</td><td>String</td><td>No</td><td>An OData filter clause to apply to the operation.</td></tr>
     * </table>
     *
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     name: String (Optional)
     *     type: String(StopDevBox) (Optional)
     *     frequency: String(Daily) (Optional)
     *     time: String (Optional)
     *     timeZone: String (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param poolName The name of a pool of Dev Boxes.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the Schedule list result as paginated response with {@link PagedIterable}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<BinaryData> listSchedulesByPool(
            String projectName, String poolName, RequestOptions requestOptions) {
        return new PagedIterable<>(this.client.listSchedulesByPool(projectName, poolName, requestOptions));
    }

    /**
     * Gets a schedule.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     name: String (Optional)
     *     type: String(StopDevBox) (Optional)
     *     frequency: String(Daily) (Optional)
     *     time: String (Optional)
     *     timeZone: String (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param poolName The name of a pool of Dev Boxes.
     * @param scheduleName The name of a schedule.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return a schedule along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getScheduleByPoolWithResponse(
            String projectName, String poolName, String scheduleName, RequestOptions requestOptions) {
        return this.client.getScheduleByPoolWithResponse(projectName, poolName, scheduleName, requestOptions).block();
    }

    /**
     * Lists Dev Boxes in the project for a particular user.
     *
     * <p><strong>Query Parameters</strong>
     *
     * <table border="1">
     *     <caption>Query Parameters</caption>
     *     <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     *     <tr><td>filter</td><td>String</td><td>No</td><td>An OData filter clause to apply to the operation.</td></tr>
     *     <tr><td>top</td><td>Integer</td><td>No</td><td>The maximum number of resources to return from the operation. Example: 'top=10'.</td></tr>
     * </table>
     *
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     name: String (Optional)
     *     projectName: String (Optional)
     *     poolName: String (Required)
     *     hibernateSupport: String(Disabled/Enabled) (Optional)
     *     provisioningState: String (Optional)
     *     actionState: String (Optional)
     *     powerState: String(Unknown/Deallocated/PoweredOff/Running/Hibernated) (Optional)
     *     uniqueId: String (Optional)
     *     errorDetails (Optional): {
     *         code: String (Optional)
     *         message: String (Optional)
     *     }
     *     location: String (Optional)
     *     osType: String(Windows) (Optional)
     *     user: String (Optional)
     *     hardwareProfile (Optional): {
     *         skuName: String (Optional)
     *         vCPUs: Integer (Optional)
     *         memoryGB: Integer (Optional)
     *     }
     *     storageProfile (Optional): {
     *         osDisk (Optional): {
     *             diskSizeGB: Integer (Optional)
     *         }
     *     }
     *     imageReference (Optional): {
     *         name: String (Optional)
     *         version: String (Optional)
     *         operatingSystem: String (Optional)
     *         osBuildNumber: String (Optional)
     *         publishedDate: OffsetDateTime (Optional)
     *     }
     *     createdTime: OffsetDateTime (Optional)
     *     localAdministrator: String(Enabled/Disabled) (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the Dev Box list result as paginated response with {@link PagedIterable}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<BinaryData> listDevBoxesByUser(
            String projectName, String userId, RequestOptions requestOptions) {
        return new PagedIterable<>(this.client.listDevBoxesByUser(projectName, userId, requestOptions));
    }

    /**
     * Gets a Dev Box.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     name: String (Optional)
     *     projectName: String (Optional)
     *     poolName: String (Required)
     *     hibernateSupport: String(Disabled/Enabled) (Optional)
     *     provisioningState: String (Optional)
     *     actionState: String (Optional)
     *     powerState: String(Unknown/Deallocated/PoweredOff/Running/Hibernated) (Optional)
     *     uniqueId: String (Optional)
     *     errorDetails (Optional): {
     *         code: String (Optional)
     *         message: String (Optional)
     *     }
     *     location: String (Optional)
     *     osType: String(Windows) (Optional)
     *     user: String (Optional)
     *     hardwareProfile (Optional): {
     *         skuName: String (Optional)
     *         vCPUs: Integer (Optional)
     *         memoryGB: Integer (Optional)
     *     }
     *     storageProfile (Optional): {
     *         osDisk (Optional): {
     *             diskSizeGB: Integer (Optional)
     *         }
     *     }
     *     imageReference (Optional): {
     *         name: String (Optional)
     *         version: String (Optional)
     *         operatingSystem: String (Optional)
     *         osBuildNumber: String (Optional)
     *         publishedDate: OffsetDateTime (Optional)
     *     }
     *     createdTime: OffsetDateTime (Optional)
     *     localAdministrator: String(Enabled/Disabled) (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return a Dev Box along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getDevBoxByUserWithResponse(
            String projectName, String userId, String devBoxName, RequestOptions requestOptions) {
        return this.client.getDevBoxByUserWithResponse(projectName, userId, devBoxName, requestOptions).block();
    }

    /**
     * Creates or updates a Dev Box.
     *
     * <p><strong>Request Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     name: String (Optional)
     *     projectName: String (Optional)
     *     poolName: String (Required)
     *     hibernateSupport: String(Disabled/Enabled) (Optional)
     *     provisioningState: String (Optional)
     *     actionState: String (Optional)
     *     powerState: String(Unknown/Deallocated/PoweredOff/Running/Hibernated) (Optional)
     *     uniqueId: String (Optional)
     *     errorDetails (Optional): {
     *         code: String (Optional)
     *         message: String (Optional)
     *     }
     *     location: String (Optional)
     *     osType: String(Windows) (Optional)
     *     user: String (Optional)
     *     hardwareProfile (Optional): {
     *         skuName: String (Optional)
     *         vCPUs: Integer (Optional)
     *         memoryGB: Integer (Optional)
     *     }
     *     storageProfile (Optional): {
     *         osDisk (Optional): {
     *             diskSizeGB: Integer (Optional)
     *         }
     *     }
     *     imageReference (Optional): {
     *         name: String (Optional)
     *         version: String (Optional)
     *         operatingSystem: String (Optional)
     *         osBuildNumber: String (Optional)
     *         publishedDate: OffsetDateTime (Optional)
     *     }
     *     createdTime: OffsetDateTime (Optional)
     *     localAdministrator: String(Enabled/Disabled) (Optional)
     * }
     * }</pre>
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     name: String (Optional)
     *     projectName: String (Optional)
     *     poolName: String (Required)
     *     hibernateSupport: String(Disabled/Enabled) (Optional)
     *     provisioningState: String (Optional)
     *     actionState: String (Optional)
     *     powerState: String(Unknown/Deallocated/PoweredOff/Running/Hibernated) (Optional)
     *     uniqueId: String (Optional)
     *     errorDetails (Optional): {
     *         code: String (Optional)
     *         message: String (Optional)
     *     }
     *     location: String (Optional)
     *     osType: String(Windows) (Optional)
     *     user: String (Optional)
     *     hardwareProfile (Optional): {
     *         skuName: String (Optional)
     *         vCPUs: Integer (Optional)
     *         memoryGB: Integer (Optional)
     *     }
     *     storageProfile (Optional): {
     *         osDisk (Optional): {
     *             diskSizeGB: Integer (Optional)
     *         }
     *     }
     *     imageReference (Optional): {
     *         name: String (Optional)
     *         version: String (Optional)
     *         operatingSystem: String (Optional)
     *         osBuildNumber: String (Optional)
     *         publishedDate: OffsetDateTime (Optional)
     *     }
     *     createdTime: OffsetDateTime (Optional)
     *     localAdministrator: String(Enabled/Disabled) (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param body Represents a environment.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link SyncPoller} for polling of a DevBox Dev Box.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginCreateDevBox(
            String projectName, String userId, String devBoxName, BinaryData body, RequestOptions requestOptions) {
        return this.client.beginCreateDevBox(projectName, userId, devBoxName, body, requestOptions).getSyncPoller();
    }

    /**
     * Deletes a Dev Box.
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, Void> beginDeleteDevBox(
            String projectName, String userId, String devBoxName, RequestOptions requestOptions) {
        return this.client.beginDeleteDevBox(projectName, userId, devBoxName, requestOptions).getSyncPoller();
    }

    /**
     * Starts a Dev Box.
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginStartDevBox(
            String projectName, String userId, String devBoxName, RequestOptions requestOptions) {
        return this.client.beginStartDevBox(projectName, userId, devBoxName, requestOptions).getSyncPoller();
    }

    /**
     * Stops a Dev Box.
     *
     * <p><strong>Query Parameters</strong>
     *
     * <table border="1">
     *     <caption>Query Parameters</caption>
     *     <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     *     <tr><td>hibernate</td><td>Boolean</td><td>No</td><td>Optional parameter to hibernate the dev box.</td></tr>
     * </table>
     *
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginStopDevBox(
            String projectName, String userId, String devBoxName, RequestOptions requestOptions) {
        return this.client.beginStopDevBox(projectName, userId, devBoxName, requestOptions).getSyncPoller();
    }

    /**
     * Gets RDP Connection info.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     webUrl: String (Optional)
     *     rdpConnectionUrl: String (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return rDP Connection info along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getRemoteConnectionWithResponse(
            String projectName, String userId, String devBoxName, RequestOptions requestOptions) {
        return this.client.getRemoteConnectionWithResponse(projectName, userId, devBoxName, requestOptions).block();
    }

    /**
     * Lists upcoming actions on a Dev Box.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     id: String (Optional)
     *     actionType: String(Stop) (Optional)
     *     reason: String(Schedule) (Optional)
     *     scheduledTime: OffsetDateTime (Optional)
     *     originalScheduledTime: OffsetDateTime (Optional)
     *     sourceId: String (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the Upcoming Action list result as paginated response with {@link PagedIterable}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<BinaryData> listUpcomingActions(
            String projectName, String userId, String devBoxName, RequestOptions requestOptions) {
        return new PagedIterable<>(this.client.listUpcomingActions(projectName, userId, devBoxName, requestOptions));
    }

    /**
     * Gets an Upcoming Action.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     id: String (Optional)
     *     actionType: String(Stop) (Optional)
     *     reason: String(Schedule) (Optional)
     *     scheduledTime: OffsetDateTime (Optional)
     *     originalScheduledTime: OffsetDateTime (Optional)
     *     sourceId: String (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param upcomingActionId The upcoming action id.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return an Upcoming Action along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getUpcomingActionWithResponse(
            String projectName,
            String userId,
            String devBoxName,
            String upcomingActionId,
            RequestOptions requestOptions) {
        return this.client
                .getUpcomingActionWithResponse(projectName, userId, devBoxName, upcomingActionId, requestOptions)
                .block();
    }

    /**
     * Skips an Upcoming Action.
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param upcomingActionId The upcoming action id.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> skipUpcomingActionWithResponse(
            String projectName,
            String userId,
            String devBoxName,
            String upcomingActionId,
            RequestOptions requestOptions) {
        return this.client
                .skipUpcomingActionWithResponse(projectName, userId, devBoxName, upcomingActionId, requestOptions)
                .block();
    }

    /**
     * Delays an Upcoming Action.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     id: String (Optional)
     *     actionType: String(Stop) (Optional)
     *     reason: String(Schedule) (Optional)
     *     scheduledTime: OffsetDateTime (Optional)
     *     originalScheduledTime: OffsetDateTime (Optional)
     *     sourceId: String (Optional)
     * }
     * }</pre>
     *
     * @param projectName The DevCenter Project upon which to execute operations.
     * @param userId The AAD object id of the user. If value is 'me', the identity is taken from the authentication
     *     context.
     * @param devBoxName The name of a Dev Box.
     * @param upcomingActionId The upcoming action id.
     * @param delayUntil The delayed action time (UTC).
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return an upcoming Action along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> delayUpcomingActionWithResponse(
            String projectName,
            String userId,
            String devBoxName,
            String upcomingActionId,
            OffsetDateTime delayUntil,
            RequestOptions requestOptions) {
        return this.client
                .delayUpcomingActionWithResponse(
                        projectName, userId, devBoxName, upcomingActionId, delayUntil, requestOptions)
                .block();
    }
}
