/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param filter The filter to apply on the operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture<List<PolicyAssignmentInner>> listByResourceGroupAsync(final String resourceGroupName, final String filter, final ListOperationCallback<PolicyAssignmentInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName, filter), new Func1<String, Observable<ServiceResponse<Page<PolicyAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture<List<PolicyAssignmentInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<PolicyAssignmentInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), new Func1<String, Observable<ServiceResponse<Page<PolicyAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object */ public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1<ServiceResponse<Page<PolicyAssignmentInner>>, Observable<ServiceResponse<Page<PolicyAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> call(ServiceResponse<Page<PolicyAssignmentInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param filter The filter to apply on the operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture<List<PolicyAssignmentInner>> listByResourceGroupAsync(final String resourceGroupName, final String filter, final ListOperationCallback<PolicyAssignmentInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName, filter), new Func1<String, Observable<ServiceResponse<Page<PolicyAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param filter The filter to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object */ public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter) { return listByResourceGroupSinglePageAsync(resourceGroupName, filter) .concatMap(new Func1<ServiceResponse<Page<PolicyAssignmentInner>>, Observable<ServiceResponse<Page<PolicyAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> call(ServiceResponse<Page<PolicyAssignmentInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture<List<PolicyAssignmentInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<PolicyAssignmentInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), new Func1<String, Observable<ServiceResponse<Page<PolicyAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param filter The filter to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object */ public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter) { return listByResourceGroupSinglePageAsync(resourceGroupName, filter) .concatMap(new Func1<ServiceResponse<Page<PolicyAssignmentInner>>, Observable<ServiceResponse<Page<PolicyAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> call(ServiceResponse<Page<PolicyAssignmentInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object */ public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1<ServiceResponse<Page<PolicyAssignmentInner>>, Observable<ServiceResponse<Page<PolicyAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> call(ServiceResponse<Page<PolicyAssignmentInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<PolicyAssignmentInner> object if successful. */ public PagedList<PolicyAssignmentInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<PolicyAssignmentInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<PolicyAssignmentInner>(response.body()) { @Override public Page<PolicyAssignmentInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param filter The filter to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<PolicyAssignmentInner> object if successful. */ public PagedList<PolicyAssignmentInner> listByResourceGroup(final String resourceGroupName, final String filter) { ServiceResponse<Page<PolicyAssignmentInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter).toBlocking().single(); return new PagedList<PolicyAssignmentInner>(response.body()) { @Override public Page<PolicyAssignmentInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<PolicyAssignmentInner> object if successful. */ public PagedList<PolicyAssignmentInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<PolicyAssignmentInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<PolicyAssignmentInner>(response.body()) { @Override public Page<PolicyAssignmentInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
/** * Gets policy assignments for the resource group. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param filter The filter to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<PolicyAssignmentInner> object if successful. */ public PagedList<PolicyAssignmentInner> listByResourceGroup(final String resourceGroupName, final String filter) { ServiceResponse<Page<PolicyAssignmentInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter).toBlocking().single(); return new PagedList<PolicyAssignmentInner>(response.body()) { @Override public Page<PolicyAssignmentInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }