Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ private MethodGroupClient createMethodGroupClient(OperationGroup methodGroup) {

List<ProxyMethod> restAPIMethods = new ArrayList<>();
for (Operation method : methodGroup.getOperations()) {
// azure-core does not support OPTIONS HTTP method.
// https://github.com/Azure/autorest.java/issues/453
if (!"options".equals(method.getRequests().get(0).getProtocol().getHttp().getMethod())) {
restAPIMethods.addAll(Mappers.getProxyMethodMapper().map(method).values());
}
restAPIMethods.addAll(Mappers.getProxyMethodMapper().map(method).values());
}
proxyBuilder.methods(restAPIMethods);

Expand Down Expand Up @@ -119,11 +115,7 @@ private MethodGroupClient createMethodGroupClient(OperationGroup methodGroup) {

List<ClientMethod> clientMethods = new ArrayList<>();
for (Operation operation : methodGroup.getOperations()) {
// "options" is not supported in HttpMethod in azure-core
// https://github.com/Azure/autorest.java/issues/453
if (!"options".equals(operation.getRequests().get(0).getProtocol().getHttp().getMethod())) {
clientMethods.addAll(Mappers.getClientMethodMapper().map(operation));
}
clientMethods.addAll(Mappers.getClientMethodMapper().map(operation));
}
builder.clientMethods(clientMethods);
builder.supportedInterfaces(supportedInterfaces(methodGroup, clientMethods));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ public Mono<Response<Void>> get400WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get400WithResponseAsync(requestOptions);
}

/**
* Return 400 status code - should be represented in the client as an error.
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return the completion.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> options400WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options400WithResponseAsync(requestOptions);
}

/**
* Return 400 status code - should be represented in the client as an error.
*
Expand Down Expand Up @@ -165,6 +179,20 @@ public Mono<Response<Void>> get402WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get402WithResponseAsync(requestOptions);
}

/**
* Return 403 status code - should be represented in the client as an error.
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return the completion.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> options403WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options403WithResponseAsync(requestOptions);
}

/**
* Return 403 status code - should be represented in the client as an error.
*
Expand Down Expand Up @@ -307,6 +335,20 @@ public Mono<Response<Void>> get411WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get411WithResponseAsync(requestOptions);
}

/**
* Return 412 status code - should be represented in the client as an error.
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return the completion.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> options412WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options412WithResponseAsync(requestOptions);
}

/**
* Return 412 status code - should be represented in the client as an error.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ public Response<Void> get400WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get400WithResponse(requestOptions);
}

/**
* Return 400 status code - should be represented in the client as an error.
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return the response.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> options400WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options400WithResponse(requestOptions);
}

/**
* Return 400 status code - should be represented in the client as an error.
*
Expand Down Expand Up @@ -164,6 +178,20 @@ public Response<Void> get402WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get402WithResponse(requestOptions);
}

/**
* Return 403 status code - should be represented in the client as an error.
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return the response.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> options403WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options403WithResponse(requestOptions);
}

/**
* Return 403 status code - should be represented in the client as an error.
*
Expand Down Expand Up @@ -306,6 +334,20 @@ public Response<Void> get411WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get411WithResponse(requestOptions);
}

/**
* Return 412 status code - should be represented in the client as an error.
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return the response.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> options412WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options412WithResponse(requestOptions);
}

/**
* Return 412 status code - should be represented in the client as an error.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,20 @@ public Mono<Response<Void>> get307WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get307WithResponseAsync(requestOptions);
}

/**
* options redirected with 307, resulting in a 200 after redirect.
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return the completion.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> options307WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options307WithResponseAsync(requestOptions);
}

/**
* Put redirected with 307, resulting in a 200 after redirect.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,20 @@ public Response<Void> get307WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get307WithResponse(requestOptions);
}

/**
* options redirected with 307, resulting in a 200 after redirect.
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return the response.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> options307WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options307WithResponse(requestOptions);
}

/**
* Put redirected with 307, resulting in a 200 after redirect.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,26 @@ public Mono<Response<Void>> get502WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get502WithResponseAsync(requestOptions);
}

/**
* Return 502 status code, then 200 after retry.
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* boolean
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return simple boolean.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Boolean>> options502WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options502WithResponseAsync(requestOptions);
}

/**
* Return 503 status code, then 200 after retry.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,26 @@ public Response<Void> get502WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get502WithResponse(requestOptions);
}

/**
* Return 502 status code, then 200 after retry.
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* boolean
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return simple boolean.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Boolean> options502WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options502WithResponse(requestOptions);
}

/**
* Return 503 status code, then 200 after retry.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ public Mono<Response<Boolean>> get200WithResponse(RequestOptions requestOptions)
return this.serviceClient.get200WithResponseAsync(requestOptions);
}

/**
* Options 200 success.
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* boolean
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return simple boolean.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Boolean>> options200WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options200WithResponseAsync(requestOptions);
}

/**
* Put boolean value true returning 200 success.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,26 @@ public Response<Boolean> get200WithResponse(RequestOptions requestOptions) {
return this.serviceClient.get200WithResponse(requestOptions);
}

/**
* Options 200 success.
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* boolean
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if status code is 400 or above, if throwOnError in requestOptions is not
* false.
* @return simple boolean.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Boolean> options200WithResponse(RequestOptions requestOptions) {
return this.serviceClient.options200WithResponse(requestOptions);
}

/**
* Put boolean value true returning 200 success.
*
Expand Down
Loading