|
13 | 13 | import com.azure.core.exception.ResourceModifiedException; |
14 | 14 | import com.azure.core.exception.ResourceNotFoundException; |
15 | 15 | import com.azure.core.http.HttpHeaderName; |
| 16 | +import com.azure.core.http.RequestConditions; |
16 | 17 | import com.azure.core.http.rest.RequestOptions; |
17 | 18 | import com.azure.core.http.rest.Response; |
18 | 19 | import com.azure.core.util.BinaryData; |
| 20 | +import com.azure.core.util.DateTimeRfc1123; |
19 | 21 | import com.azure.core.util.FluxUtil; |
| 22 | +import java.time.OffsetDateTime; |
20 | 23 | import methodoverride.implementation.MethodOverrideClientImpl; |
21 | 24 | import methodoverride.implementation.models.GroupAllRequest; |
22 | 25 | import methodoverride.implementation.models.GroupNoneRequest; |
| 26 | +import methodoverride.implementation.models.GroupPartETagRequest; |
23 | 27 | import methodoverride.implementation.models.GroupPartRequest; |
24 | 28 | import methodoverride.models.GroupAllOptions; |
25 | 29 | import methodoverride.models.GroupExcludeBodyModel; |
| 30 | +import methodoverride.models.GroupPartETagOptions; |
26 | 31 | import methodoverride.models.GroupPartOptions; |
27 | 32 | import methodoverride.models.GroupQueryOptions; |
28 | 33 | import reactor.core.publisher.Mono; |
@@ -139,6 +144,52 @@ public Mono<Response<Void>> groupPartWithResponse(BinaryData groupPartRequest, R |
139 | 144 | return this.serviceClient.groupPartWithResponseAsync(groupPartRequest, requestOptions); |
140 | 145 | } |
141 | 146 |
|
| 147 | + /** |
| 148 | + * A remote procedure call (RPC) operation. |
| 149 | + * <p><strong>Query Parameters</strong></p> |
| 150 | + * <table border="1"> |
| 151 | + * <caption>Query Parameters</caption> |
| 152 | + * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> |
| 153 | + * <tr><td>foo</td><td>String</td><td>No</td><td>The foo parameter</td></tr> |
| 154 | + * <tr><td>bar</td><td>String</td><td>No</td><td>The bar parameter</td></tr> |
| 155 | + * </table> |
| 156 | + * You can add these to a request with {@link RequestOptions#addQueryParam} |
| 157 | + * <p><strong>Header Parameters</strong></p> |
| 158 | + * <table border="1"> |
| 159 | + * <caption>Header Parameters</caption> |
| 160 | + * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> |
| 161 | + * <tr><td>If-Modified-Since</td><td>OffsetDateTime</td><td>No</td><td>The ifModifiedSince parameter</td></tr> |
| 162 | + * <tr><td>If-Unmodified-Since</td><td>OffsetDateTime</td><td>No</td><td>The ifUnmodifiedSince parameter</td></tr> |
| 163 | + * <tr><td>If-Match</td><td>String</td><td>No</td><td>The ifMatch parameter</td></tr> |
| 164 | + * <tr><td>If-None-Match</td><td>String</td><td>No</td><td>The ifNoneMatch parameter</td></tr> |
| 165 | + * </table> |
| 166 | + * You can add these to a request with {@link RequestOptions#addHeader} |
| 167 | + * <p><strong>Request Body Schema</strong></p> |
| 168 | + * |
| 169 | + * <pre> |
| 170 | + * {@code |
| 171 | + * { |
| 172 | + * prop1: String (Required) |
| 173 | + * prop2: String (Optional) |
| 174 | + * } |
| 175 | + * } |
| 176 | + * </pre> |
| 177 | + * |
| 178 | + * @param groupPartETagRequest The groupPartETagRequest parameter. |
| 179 | + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. |
| 180 | + * @throws HttpResponseException thrown if the request is rejected by server. |
| 181 | + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. |
| 182 | + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. |
| 183 | + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. |
| 184 | + * @return the {@link Response} on successful completion of {@link Mono}. |
| 185 | + */ |
| 186 | + @Generated |
| 187 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 188 | + public Mono<Response<Void>> groupPartETagWithResponse(BinaryData groupPartETagRequest, |
| 189 | + RequestOptions requestOptions) { |
| 190 | + return this.serviceClient.groupPartETagWithResponseAsync(groupPartETagRequest, requestOptions); |
| 191 | + } |
| 192 | + |
142 | 193 | /** |
143 | 194 | * A remote procedure call (RPC) operation. |
144 | 195 | * <p><strong>Query Parameters</strong></p> |
@@ -348,6 +399,79 @@ public Mono<Void> groupPart(String prop1) { |
348 | 399 | return groupPartWithResponse(groupPartRequest, requestOptions).flatMap(FluxUtil::toMono); |
349 | 400 | } |
350 | 401 |
|
| 402 | + /** |
| 403 | + * A remote procedure call (RPC) operation. |
| 404 | + * |
| 405 | + * @param prop1 The prop1 parameter. |
| 406 | + * @param foo The foo parameter. |
| 407 | + * @param options The options parameter. |
| 408 | + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. |
| 409 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 410 | + * @throws HttpResponseException thrown if the request is rejected by server. |
| 411 | + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. |
| 412 | + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. |
| 413 | + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. |
| 414 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 415 | + * @return A {@link Mono} that completes when a successful response is received. |
| 416 | + */ |
| 417 | + @Generated |
| 418 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 419 | + public Mono<Void> groupPartETag(String prop1, String foo, GroupPartETagOptions options, |
| 420 | + RequestConditions requestConditions) { |
| 421 | + // Generated convenience method for groupPartETagWithResponse |
| 422 | + RequestOptions requestOptions = new RequestOptions(); |
| 423 | + GroupPartETagRequest groupPartETagRequestObj = new GroupPartETagRequest(prop1).setProp2(options.getProp2()); |
| 424 | + BinaryData groupPartETagRequest = BinaryData.fromObject(groupPartETagRequestObj); |
| 425 | + String bar = options == null ? null : options.getBar(); |
| 426 | + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); |
| 427 | + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); |
| 428 | + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); |
| 429 | + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); |
| 430 | + if (foo != null) { |
| 431 | + requestOptions.addQueryParam("foo", foo, false); |
| 432 | + } |
| 433 | + if (bar != null) { |
| 434 | + requestOptions.addQueryParam("bar", bar, false); |
| 435 | + } |
| 436 | + if (ifModifiedSince != null) { |
| 437 | + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, |
| 438 | + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); |
| 439 | + } |
| 440 | + if (ifUnmodifiedSince != null) { |
| 441 | + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, |
| 442 | + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); |
| 443 | + } |
| 444 | + if (ifMatch != null) { |
| 445 | + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); |
| 446 | + } |
| 447 | + if (ifNoneMatch != null) { |
| 448 | + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); |
| 449 | + } |
| 450 | + return groupPartETagWithResponse(groupPartETagRequest, requestOptions).flatMap(FluxUtil::toMono); |
| 451 | + } |
| 452 | + |
| 453 | + /** |
| 454 | + * A remote procedure call (RPC) operation. |
| 455 | + * |
| 456 | + * @param prop1 The prop1 parameter. |
| 457 | + * @throws IllegalArgumentException thrown if parameters fail the validation. |
| 458 | + * @throws HttpResponseException thrown if the request is rejected by server. |
| 459 | + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. |
| 460 | + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. |
| 461 | + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. |
| 462 | + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. |
| 463 | + * @return A {@link Mono} that completes when a successful response is received. |
| 464 | + */ |
| 465 | + @Generated |
| 466 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 467 | + public Mono<Void> groupPartETag(String prop1) { |
| 468 | + // Generated convenience method for groupPartETagWithResponse |
| 469 | + RequestOptions requestOptions = new RequestOptions(); |
| 470 | + GroupPartETagRequest groupPartETagRequestObj = new GroupPartETagRequest(prop1); |
| 471 | + BinaryData groupPartETagRequest = BinaryData.fromObject(groupPartETagRequestObj); |
| 472 | + return groupPartETagWithResponse(groupPartETagRequest, requestOptions).flatMap(FluxUtil::toMono); |
| 473 | + } |
| 474 | + |
351 | 475 | /** |
352 | 476 | * A remote procedure call (RPC) operation. |
353 | 477 | * |
|
0 commit comments