code: public Observable<ServiceResponse<Page<DetectorDefinitionInner>>> getSiteDetectorWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName) {
          return getSiteDetectorSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, detectorName)
              .concatMap(new Func1<ServiceResponse<Page<DetectorDefinitionInner>>, Observable<ServiceResponse<Page<DetectorDefinitionInner>>>>() {
                  @Override
                  public Observable<ServiceResponse<Page<DetectorDefinitionInner>>> call(ServiceResponse<Page<DetectorDefinitionInner>> page) {
                      String nextPageLink = page.body().nextPageLink();
                      if (nextPageLink == null) {
                          return Observable.just(page);
                      }
                      return Observable.just(page).concatWith(getSiteDetectorNextWithServiceResponseAsync(nextPageLink));
                  }
              });
      }
docs: Get Detector.
  Get Detector.
  
  @param resourceGroupName Name of the resource group to which the resource belongs.
  @param siteName Site Name
  @param diagnosticCategory Diagnostic Category
  @param detectorName Detector Name
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the PagedList&lt;DetectorDefinitionInner&gt; object