use of fixtures.paging.models.PagingGetMultiplePagesOptions in project autorest.java by Azure.
the class PagingsImpl method getMultiplePagesSinglePageAsync.
/**
* A paging operation that includes a nextLink that has 10 pages.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<Product> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<Product>>> getMultiplePagesSinglePageAsync() {
final String clientRequestId = null;
final PagingGetMultiplePagesOptions pagingGetMultiplePagesOptions = null;
Integer maxresults = null;
Integer timeout = null;
return service.getMultiplePages(clientRequestId, this.client.acceptLanguage(), maxresults, timeout, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<Product>>>>() {
@Override
public Observable<ServiceResponse<Page<Product>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<Product>> result = getMultiplePagesDelegate(response);
return Observable.just(new ServiceResponse<Page<Product>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
use of fixtures.paging.models.PagingGetMultiplePagesOptions in project autorest.java by Azure.
the class PagingsImpl method getMultiplePagesNextSinglePageAsync.
/**
* A paging operation that includes a nextLink that has 10 pages.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<Product> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<Product>>> getMultiplePagesNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
final String clientRequestId = null;
final PagingGetMultiplePagesOptions pagingGetMultiplePagesOptions = null;
Integer maxresults = null;
Integer timeout = null;
String nextUrl = String.format("%s", nextPageLink);
return service.getMultiplePagesNext(nextUrl, clientRequestId, this.client.acceptLanguage(), maxresults, timeout, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<Product>>>>() {
@Override
public Observable<ServiceResponse<Page<Product>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<Product>> result = getMultiplePagesNextDelegate(response);
return Observable.just(new ServiceResponse<Page<Product>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Aggregations