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

package tsptest.enumservice;

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.HttpHeaderName;
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.FluxUtil;
import com.azure.core.util.serializer.CollectionFormat;
import com.azure.core.util.serializer.JacksonAdapter;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import reactor.core.publisher.Mono;
import tsptest.enumservice.implementation.EnumServiceClientImpl;
import tsptest.enumservice.models.Color;
import tsptest.enumservice.models.ColorModel;
import tsptest.enumservice.models.Operation;
import tsptest.enumservice.models.OperationStateValues;
import tsptest.enumservice.models.Priority;

/**
 * Initializes a new instance of the asynchronous EnumServiceClient type.
 */
@ServiceClient(builder = EnumServiceClientBuilder.class, isAsync = true)
public final class EnumServiceAsyncClient {
    @Generated
    private final EnumServiceClientImpl serviceClient;

    /**
     * Initializes an instance of EnumServiceAsyncClient class.
     * 
     * @param serviceClient the service client implementation.
     */
    @Generated
    EnumServiceAsyncClient(EnumServiceClientImpl serviceClient) {
        this.serviceClient = serviceClient;
    }

    /**
     * The getColor operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * String(Red/Blue/Green)
     * }
     * </pre>
     * 
     * @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 response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> getColorWithResponse(RequestOptions requestOptions) {
        return this.serviceClient.getColorWithResponseAsync(requestOptions);
    }

    /**
     * The getColorModel operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * String(Red/Blue/Green)
     * }
     * </pre>
     * 
     * @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 response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> getColorModelWithResponse(RequestOptions requestOptions) {
        return this.serviceClient.getColorModelWithResponseAsync(requestOptions);
    }

    /**
     * The setColorModel operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * {
     *     name: String(Read/Write) (Required)
     *     best: boolean (Required)
     *     age: int (Required)
     *     priority: String(100/0) (Required)
     *     color: String(Red/Blue/Green) (Required)
     *     unit: String(1/0.001/1000) (Required)
     *     priorityValue: String(100/0) (Required)
     *     colorValue: String(Red/Blue/Green) (Required)
     *     colorModelValue: String(Red/Blue/Green) (Required)
     *     unitValue: String(1/0.001/1000) (Optional)
     *     olympicRecord: String(9.58/19.3) (Optional)
     *     olympicRecordValue: String(9.58/19.3) (Optional)
     * }
     * }
     * </pre>
     * 
     * @param color The color parameter. Allowed values: "Red", "Blue", "Green".
     * @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 response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> setColorModelWithResponse(String color, RequestOptions requestOptions) {
        return this.serviceClient.setColorModelWithResponseAsync(color, requestOptions);
    }

    /**
     * The setPriority operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * {
     *     name: String(Read/Write) (Required)
     *     best: boolean (Required)
     *     age: int (Required)
     *     priority: String(100/0) (Required)
     *     color: String(Red/Blue/Green) (Required)
     *     unit: String(1/0.001/1000) (Required)
     *     priorityValue: String(100/0) (Required)
     *     colorValue: String(Red/Blue/Green) (Required)
     *     colorModelValue: String(Red/Blue/Green) (Required)
     *     unitValue: String(1/0.001/1000) (Optional)
     *     olympicRecord: String(9.58/19.3) (Optional)
     *     olympicRecordValue: String(9.58/19.3) (Optional)
     * }
     * }
     * </pre>
     * 
     * @param priority The priority parameter. Allowed values: 100, 0.
     * @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 response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> setPriorityWithResponse(String priority, RequestOptions requestOptions) {
        return this.serviceClient.setPriorityWithResponseAsync(priority, requestOptions);
    }

    /**
     * The getRunningOperation operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * {
     *     name: String(Read/Write) (Required)
     *     best: boolean (Required)
     *     age: int (Required)
     *     priority: String(100/0) (Required)
     *     color: String(Red/Blue/Green) (Required)
     *     unit: String(1/0.001/1000) (Required)
     *     priorityValue: String(100/0) (Required)
     *     colorValue: String(Red/Blue/Green) (Required)
     *     colorModelValue: String(Red/Blue/Green) (Required)
     *     unitValue: String(1/0.001/1000) (Optional)
     *     olympicRecord: String(9.58/19.3) (Optional)
     *     olympicRecordValue: String(9.58/19.3) (Optional)
     * }
     * }
     * </pre>
     * 
     * @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 response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> getRunningOperationWithResponse(RequestOptions requestOptions) {
        return this.serviceClient.getRunningOperationWithResponseAsync(requestOptions);
    }

    /**
     * The getOperation operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * {
     *     name: String(Read/Write) (Required)
     *     best: boolean (Required)
     *     age: int (Required)
     *     priority: String(100/0) (Required)
     *     color: String(Red/Blue/Green) (Required)
     *     unit: String(1/0.001/1000) (Required)
     *     priorityValue: String(100/0) (Required)
     *     colorValue: String(Red/Blue/Green) (Required)
     *     colorModelValue: String(Red/Blue/Green) (Required)
     *     unitValue: String(1/0.001/1000) (Optional)
     *     olympicRecord: String(9.58/19.3) (Optional)
     *     olympicRecordValue: String(9.58/19.3) (Optional)
     * }
     * }
     * </pre>
     * 
     * @param state The state parameter. Allowed values: "Running", "Completed", "Failed".
     * @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 response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> getOperationWithResponse(String state, RequestOptions requestOptions) {
        return this.serviceClient.getOperationWithResponseAsync(state, requestOptions);
    }

    /**
     * The setStringEnumArray operation.
     * <p><strong>Query Parameters</strong></p>
     * <table border="1">
     * <caption>Query Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>colorArrayOpt</td><td>List&lt;String&gt;</td><td>No</td><td>The colorArrayOpt parameter. In the form of
     * "," separated string.</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * String
     * }
     * </pre>
     * 
     * @param colorArray The colorArray parameter.
     * @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 sequence of textual characters along with {@link Response} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> setStringEnumArrayWithResponse(List<String> colorArray,
        RequestOptions requestOptions) {
        return this.serviceClient.setStringEnumArrayWithResponseAsync(colorArray, requestOptions);
    }

    /**
     * The setIntEnumArray operation.
     * <p><strong>Query Parameters</strong></p>
     * <table border="1">
     * <caption>Query Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>priorityArrayOpt</td><td>List&lt;String&gt;</td><td>No</td><td>The priorityArrayOpt parameter. In the
     * form of "," separated string.</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     * 
     * @param priorityArray The priorityArray parameter.
     * @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} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<Void>> setIntEnumArrayWithResponse(List<String> priorityArray, RequestOptions requestOptions) {
        return this.serviceClient.setIntEnumArrayWithResponseAsync(priorityArray, requestOptions);
    }

    /**
     * The setStringArray operation.
     * <p><strong>Query Parameters</strong></p>
     * <table border="1">
     * <caption>Query Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>stringArrayOpt</td><td>List&lt;String&gt;</td><td>No</td><td>The stringArrayOpt parameter. In the form of
     * "," separated string.</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     * 
     * @param stringArray The stringArray parameter.
     * @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} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<Void>> setStringArrayWithResponse(List<String> stringArray, RequestOptions requestOptions) {
        return this.serviceClient.setStringArrayWithResponseAsync(stringArray, requestOptions);
    }

    /**
     * The setIntArray operation.
     * <p><strong>Query Parameters</strong></p>
     * <table border="1">
     * <caption>Query Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>intArrayOpt</td><td>List&lt;Integer&gt;</td><td>No</td><td>The intArrayOpt parameter. In the form of ","
     * separated string.</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     * 
     * @param intArray The intArray parameter.
     * @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} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<Void>> setIntArrayWithResponse(List<Integer> intArray, RequestOptions requestOptions) {
        return this.serviceClient.setIntArrayWithResponseAsync(intArray, requestOptions);
    }

    /**
     * The setStringEnumMulti operation.
     * <p><strong>Query Parameters</strong></p>
     * <table border="1">
     * <caption>Query Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>colorArrayOpt</td><td>List&lt;String&gt;</td><td>No</td><td>The colorArrayOpt parameter. Call
     * {@link RequestOptions#addQueryParam} to add string to array.</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     * 
     * @param colorArray The colorArray parameter.
     * @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} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<Void>> setStringEnumMultiWithResponse(List<String> colorArray, RequestOptions requestOptions) {
        return this.serviceClient.setStringEnumMultiWithResponseAsync(colorArray, requestOptions);
    }

    /**
     * The setIntEnumMulti operation.
     * <p><strong>Query Parameters</strong></p>
     * <table border="1">
     * <caption>Query Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>priorityArrayOpt</td><td>List&lt;String&gt;</td><td>No</td><td>The priorityArrayOpt parameter. Call
     * {@link RequestOptions#addQueryParam} to add string to array.</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     * 
     * @param priorityArray The priorityArray parameter.
     * @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} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<Void>> setIntEnumMultiWithResponse(List<String> priorityArray, RequestOptions requestOptions) {
        return this.serviceClient.setIntEnumMultiWithResponseAsync(priorityArray, requestOptions);
    }

    /**
     * The setStringMulti operation.
     * <p><strong>Query Parameters</strong></p>
     * <table border="1">
     * <caption>Query Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>stringArrayOpt</td><td>List&lt;String&gt;</td><td>No</td><td>The stringArrayOpt parameter. Call
     * {@link RequestOptions#addQueryParam} to add string to array.</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     * 
     * @param stringArray The stringArray parameter.
     * @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} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<Void>> setStringMultiWithResponse(List<String> stringArray, RequestOptions requestOptions) {
        return this.serviceClient.setStringMultiWithResponseAsync(stringArray, requestOptions);
    }

    /**
     * The setIntMulti operation.
     * <p><strong>Query Parameters</strong></p>
     * <table border="1">
     * <caption>Query Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>intArrayOpt</td><td>List&lt;Integer&gt;</td><td>No</td><td>The intArrayOpt parameter. Call
     * {@link RequestOptions#addQueryParam} to add string to array.</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addQueryParam}
     * 
     * @param intArray The intArray parameter.
     * @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} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<Void>> setIntMultiWithResponse(List<Integer> intArray, RequestOptions requestOptions) {
        return this.serviceClient.setIntMultiWithResponseAsync(intArray, requestOptions);
    }

    /**
     * The setStringEnumArrayHeader operation.
     * <p><strong>Header Parameters</strong></p>
     * <table border="1">
     * <caption>Header Parameters</caption>
     * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
     * <tr><td>color-array-opt</td><td>List&lt;String&gt;</td><td>No</td><td>The colorArrayOpt parameter</td></tr>
     * </table>
     * You can add these to a request with {@link RequestOptions#addHeader}
     * 
     * @param colorArray The colorArray parameter.
     * @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} on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<Void>> setStringEnumArrayHeaderWithResponse(List<String> colorArray,
        RequestOptions requestOptions) {
        return this.serviceClient.setStringEnumArrayHeaderWithResponseAsync(colorArray, requestOptions);
    }

    /**
     * The getColor operation.
     * 
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Color> getColor() {
        // Generated convenience method for getColorWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return getColorWithResponse(requestOptions).flatMap(FluxUtil::toMono)
            .map(protocolMethodData -> Color.fromString(protocolMethodData.toObject(String.class)));
    }

    /**
     * The getColorModel operation.
     * 
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<ColorModel> getColorModel() {
        // Generated convenience method for getColorModelWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return getColorModelWithResponse(requestOptions).flatMap(FluxUtil::toMono)
            .map(protocolMethodData -> ColorModel.fromString(protocolMethodData.toObject(String.class)));
    }

    /**
     * The setColorModel operation.
     * 
     * @param color The color parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Operation> setColorModel(ColorModel color) {
        // Generated convenience method for setColorModelWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setColorModelWithResponse(color.toString(), requestOptions).flatMap(FluxUtil::toMono)
            .map(protocolMethodData -> protocolMethodData.toObject(Operation.class));
    }

    /**
     * The setPriority operation.
     * 
     * @param priority The priority parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Operation> setPriority(Priority priority) {
        // Generated convenience method for setPriorityWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setPriorityWithResponse(String.valueOf(priority.toInt()), requestOptions).flatMap(FluxUtil::toMono)
            .map(protocolMethodData -> protocolMethodData.toObject(Operation.class));
    }

    /**
     * The getRunningOperation operation.
     * 
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Operation> getRunningOperation() {
        // Generated convenience method for getRunningOperationWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return getRunningOperationWithResponse(requestOptions).flatMap(FluxUtil::toMono)
            .map(protocolMethodData -> protocolMethodData.toObject(Operation.class));
    }

    /**
     * The getOperation operation.
     * 
     * @param state The state parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Operation> getOperation(OperationStateValues state) {
        // Generated convenience method for getOperationWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return getOperationWithResponse(state.toString(), requestOptions).flatMap(FluxUtil::toMono)
            .map(protocolMethodData -> protocolMethodData.toObject(Operation.class));
    }

    /**
     * The setStringEnumArray operation.
     * 
     * @param colorArray The colorArray parameter.
     * @param colorArrayOpt The colorArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a sequence of textual characters on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<String> setStringEnumArray(List<ColorModel> colorArray, List<ColorModel> colorArrayOpt) {
        // Generated convenience method for setStringEnumArrayWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (colorArrayOpt != null) {
            requestOptions.addQueryParam("colorArrayOpt",
                colorArrayOpt.stream()
                    .map(paramItemValue -> Objects.toString(paramItemValue, ""))
                    .collect(Collectors.joining(",")),
                false);
        }
        return setStringEnumArrayWithResponse(colorArray.stream()
            .map(paramItemValue -> Objects.toString(paramItemValue, ""))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono)
                .map(protocolMethodData -> protocolMethodData.toString());
    }

    /**
     * The setStringEnumArray operation.
     * 
     * @param colorArray The colorArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a sequence of textual characters on successful completion of {@link Mono}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<String> setStringEnumArray(List<ColorModel> colorArray) {
        // Generated convenience method for setStringEnumArrayWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setStringEnumArrayWithResponse(colorArray.stream()
            .map(paramItemValue -> Objects.toString(paramItemValue, ""))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono)
                .map(protocolMethodData -> protocolMethodData.toString());
    }

    /**
     * The setIntEnumArray operation.
     * 
     * @param priorityArray The priorityArray parameter.
     * @param priorityArrayOpt The priorityArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setIntEnumArray(List<Priority> priorityArray, List<Priority> priorityArrayOpt) {
        // Generated convenience method for setIntEnumArrayWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (priorityArrayOpt != null) {
            requestOptions.addQueryParam("priorityArrayOpt",
                priorityArrayOpt.stream()
                    .map(paramItemValue -> Objects.toString(paramItemValue == null ? null : paramItemValue.toInt(), ""))
                    .collect(Collectors.joining(",")),
                false);
        }
        return setIntEnumArrayWithResponse(priorityArray.stream()
            .map(paramItemValue -> paramItemValue == null ? "" : String.valueOf(paramItemValue.toInt()))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setIntEnumArray operation.
     * 
     * @param priorityArray The priorityArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setIntEnumArray(List<Priority> priorityArray) {
        // Generated convenience method for setIntEnumArrayWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setIntEnumArrayWithResponse(priorityArray.stream()
            .map(paramItemValue -> paramItemValue == null ? "" : String.valueOf(paramItemValue.toInt()))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setStringArray operation.
     * 
     * @param stringArray The stringArray parameter.
     * @param stringArrayOpt The stringArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setStringArray(List<String> stringArray, List<String> stringArrayOpt) {
        // Generated convenience method for setStringArrayWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (stringArrayOpt != null) {
            requestOptions.addQueryParam("stringArrayOpt",
                stringArrayOpt.stream()
                    .map(paramItemValue -> Objects.toString(paramItemValue, ""))
                    .collect(Collectors.joining(",")),
                false);
        }
        return setStringArrayWithResponse(stringArray, requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setStringArray operation.
     * 
     * @param stringArray The stringArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setStringArray(List<String> stringArray) {
        // Generated convenience method for setStringArrayWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setStringArrayWithResponse(stringArray, requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setIntArray operation.
     * 
     * @param intArray The intArray parameter.
     * @param intArrayOpt The intArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setIntArray(List<Integer> intArray, List<Integer> intArrayOpt) {
        // Generated convenience method for setIntArrayWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (intArrayOpt != null) {
            requestOptions.addQueryParam("intArrayOpt",
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(intArrayOpt, CollectionFormat.CSV),
                false);
        }
        return setIntArrayWithResponse(intArray, requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setIntArray operation.
     * 
     * @param intArray The intArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setIntArray(List<Integer> intArray) {
        // Generated convenience method for setIntArrayWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setIntArrayWithResponse(intArray, requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setStringEnumMulti operation.
     * 
     * @param colorArray The colorArray parameter.
     * @param colorArrayOpt The colorArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setStringEnumMulti(List<ColorModel> colorArray, List<ColorModel> colorArrayOpt) {
        // Generated convenience method for setStringEnumMultiWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (colorArrayOpt != null) {
            for (ColorModel paramItemValue : colorArrayOpt) {
                if (paramItemValue != null) {
                    requestOptions.addQueryParam("colorArrayOpt", paramItemValue.toString(), false);
                }
            }
        }
        return setStringEnumMultiWithResponse(colorArray.stream()
            .map(paramItemValue -> Objects.toString(paramItemValue, ""))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setStringEnumMulti operation.
     * 
     * @param colorArray The colorArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setStringEnumMulti(List<ColorModel> colorArray) {
        // Generated convenience method for setStringEnumMultiWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setStringEnumMultiWithResponse(colorArray.stream()
            .map(paramItemValue -> Objects.toString(paramItemValue, ""))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setIntEnumMulti operation.
     * 
     * @param priorityArray The priorityArray parameter.
     * @param priorityArrayOpt The priorityArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setIntEnumMulti(List<Priority> priorityArray, List<Priority> priorityArrayOpt) {
        // Generated convenience method for setIntEnumMultiWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (priorityArrayOpt != null) {
            for (Priority paramItemValue : priorityArrayOpt) {
                if (paramItemValue != null) {
                    requestOptions.addQueryParam("priorityArrayOpt", String.valueOf(paramItemValue.toInt()), false);
                }
            }
        }
        return setIntEnumMultiWithResponse(priorityArray.stream()
            .map(paramItemValue -> paramItemValue == null ? "" : String.valueOf(paramItemValue.toInt()))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setIntEnumMulti operation.
     * 
     * @param priorityArray The priorityArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setIntEnumMulti(List<Priority> priorityArray) {
        // Generated convenience method for setIntEnumMultiWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setIntEnumMultiWithResponse(priorityArray.stream()
            .map(paramItemValue -> paramItemValue == null ? "" : String.valueOf(paramItemValue.toInt()))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setStringMulti operation.
     * 
     * @param stringArray The stringArray parameter.
     * @param stringArrayOpt The stringArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setStringMulti(List<String> stringArray, List<String> stringArrayOpt) {
        // Generated convenience method for setStringMultiWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (stringArrayOpt != null) {
            for (String paramItemValue : stringArrayOpt) {
                if (paramItemValue != null) {
                    requestOptions.addQueryParam("stringArrayOpt", paramItemValue, false);
                }
            }
        }
        return setStringMultiWithResponse(stringArray, requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setStringMulti operation.
     * 
     * @param stringArray The stringArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setStringMulti(List<String> stringArray) {
        // Generated convenience method for setStringMultiWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setStringMultiWithResponse(stringArray, requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setIntMulti operation.
     * 
     * @param intArray The intArray parameter.
     * @param intArrayOpt The intArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setIntMulti(List<Integer> intArray, List<Integer> intArrayOpt) {
        // Generated convenience method for setIntMultiWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (intArrayOpt != null) {
            for (int paramItemValue : intArrayOpt) {
                requestOptions.addQueryParam("intArrayOpt", String.valueOf(paramItemValue), false);
            }
        }
        return setIntMultiWithResponse(intArray, requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setIntMulti operation.
     * 
     * @param intArray The intArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setIntMulti(List<Integer> intArray) {
        // Generated convenience method for setIntMultiWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setIntMultiWithResponse(intArray, requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setStringEnumArrayHeader operation.
     * 
     * @param colorArray The colorArray parameter.
     * @param colorArrayOpt The colorArrayOpt parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setStringEnumArrayHeader(List<ColorModel> colorArray, List<ColorModel> colorArrayOpt) {
        // Generated convenience method for setStringEnumArrayHeaderWithResponse
        RequestOptions requestOptions = new RequestOptions();
        if (colorArrayOpt != null) {
            requestOptions.setHeader(HttpHeaderName.fromString("color-array-opt"),
                colorArrayOpt.stream()
                    .map(paramItemValue -> Objects.toString(paramItemValue, ""))
                    .collect(Collectors.joining(",")));
        }
        return setStringEnumArrayHeaderWithResponse(colorArray.stream()
            .map(paramItemValue -> Objects.toString(paramItemValue, ""))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono);
    }

    /**
     * The setStringEnumArrayHeader operation.
     * 
     * @param colorArray The colorArray parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Void> setStringEnumArrayHeader(List<ColorModel> colorArray) {
        // Generated convenience method for setStringEnumArrayHeaderWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return setStringEnumArrayHeaderWithResponse(colorArray.stream()
            .map(paramItemValue -> Objects.toString(paramItemValue, ""))
            .collect(Collectors.toList()), requestOptions).flatMap(FluxUtil::toMono);
    }
}
