18
18
import com .azure .communication .jobrouter .models .CreateExceptionPolicyOptions ;
19
19
import com .azure .communication .jobrouter .models .CreateQueueOptions ;
20
20
import com .azure .communication .jobrouter .models .DistributionPolicy ;
21
+ import com .azure .communication .jobrouter .models .ExceptionPolicy ;
21
22
import com .azure .communication .jobrouter .models .RouterQueue ;
22
23
import com .azure .core .annotation .Generated ;
23
24
import com .azure .core .annotation .ReturnType ;
@@ -1393,13 +1394,12 @@ public Mono<Void> deleteClassificationPolicy(String classificationPolicyId) {
1393
1394
* @return a policy that defines actions to execute when exception are triggered on successful completion of
1394
1395
* {@link Mono}.
1395
1396
*/
1396
- @ Generated
1397
1397
@ ServiceMethod (returns = ReturnType .SINGLE )
1398
- Mono <ExceptionPolicyInternal > getExceptionPolicy (String exceptionPolicyId ) {
1398
+ public Mono <ExceptionPolicy > getExceptionPolicy (String exceptionPolicyId ) {
1399
1399
// Generated convenience method for getExceptionPolicyWithResponse
1400
1400
RequestOptions requestOptions = new RequestOptions ();
1401
1401
return getExceptionPolicyWithResponse (exceptionPolicyId , requestOptions ).flatMap (FluxUtil ::toMono )
1402
- .map (protocolMethodData -> protocolMethodData .toObject (ExceptionPolicyInternal .class ));
1402
+ .map (protocolMethodData -> protocolMethodData .toObject (ExceptionPolicy .class ));
1403
1403
}
1404
1404
1405
1405
/**
@@ -1412,22 +1412,20 @@ Mono<ExceptionPolicyInternal> getExceptionPolicy(String exceptionPolicyId) {
1412
1412
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1413
1413
* @return paged collection of ExceptionPolicy items as paginated response with {@link PagedFlux}.
1414
1414
*/
1415
- @ Generated
1416
1415
@ ServiceMethod (returns = ReturnType .COLLECTION )
1417
- PagedFlux <ExceptionPolicyInternal > listExceptionPolicies () {
1416
+ public PagedFlux <ExceptionPolicy > listExceptionPolicies () {
1418
1417
// Generated convenience method for listExceptionPolicies
1419
1418
RequestOptions requestOptions = new RequestOptions ();
1420
1419
PagedFlux <BinaryData > pagedFluxResponse = listExceptionPolicies (requestOptions );
1421
1420
return PagedFlux .create (() -> (continuationToken , pageSize ) -> {
1422
1421
Flux <PagedResponse <BinaryData >> flux = (continuationToken == null ) ? pagedFluxResponse .byPage ().take (1 )
1423
1422
: pagedFluxResponse .byPage (continuationToken ).take (1 );
1424
- return flux
1425
- .map (pagedResponse -> new PagedResponseBase <Void , ExceptionPolicyInternal >(pagedResponse .getRequest (),
1426
- pagedResponse .getStatusCode (), pagedResponse .getHeaders (),
1427
- pagedResponse .getValue ().stream ()
1428
- .map (protocolMethodData -> protocolMethodData .toObject (ExceptionPolicyInternal .class ))
1429
- .collect (Collectors .toList ()),
1430
- pagedResponse .getContinuationToken (), null ));
1423
+ return flux .map (pagedResponse -> new PagedResponseBase <Void , ExceptionPolicy >(pagedResponse .getRequest (),
1424
+ pagedResponse .getStatusCode (), pagedResponse .getHeaders (),
1425
+ pagedResponse .getValue ().stream ()
1426
+ .map (protocolMethodData -> protocolMethodData .toObject (ExceptionPolicy .class ))
1427
+ .collect (Collectors .toList ()),
1428
+ pagedResponse .getContinuationToken (), null ));
1431
1429
});
1432
1430
}
1433
1431
0 commit comments