code: public PagedList<DetectorDefinitionInner> listSiteDetectors(final String resourceGroupName, final String siteName, final String diagnosticCategory) {
          ServiceResponse<Page<DetectorDefinitionInner>> response = listSiteDetectorsSinglePageAsync(resourceGroupName, siteName, diagnosticCategory).toBlocking().single();
          return new PagedList<DetectorDefinitionInner>(response.body()) {
              @Override
              public Page<DetectorDefinitionInner> nextPage(String nextPageLink) {
                  return listSiteDetectorsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
              }
          };
      }
docs: Get Detectors.
  Get Detectors.
  
  @param resourceGroupName Name of the resource group to which the resource belongs.
  @param siteName Site Name
  @param diagnosticCategory Diagnostic Category
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws DefaultErrorResponseException 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&lt;DetectorDefinitionInner&gt; object if successful.