public PagedList<DiagnosticCategoryInner> listSiteDiagnosticCategories(final String resourceGroupName, final String siteName) {
        ServiceResponse<Page<DiagnosticCategoryInner>> response = listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName).toBlocking().single();
        return new PagedList<DiagnosticCategoryInner>(response.body()) {
            @Override
            public Page<DiagnosticCategoryInner> nextPage(String nextPageLink) {
                return listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
            }
        };
    }
public PagedList < DiagnosticCategoryInner > listSiteDiagnosticCategories ( final String resourceGroupName , final String siteName ) { ServiceResponse < Page < DiagnosticCategoryInner > > response = listSiteDiagnosticCategoriesSinglePageAsync ( resourceGroupName , siteName ) . toBlocking ( ) . single ( ) ; return new PagedList < DiagnosticCategoryInner > ( response . body ( ) ) { @ Override public Page < DiagnosticCategoryInner > nextPage ( String nextPageLink ) { return listSiteDiagnosticCategoriesNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) . body ( ) ; } } ; }
Get Diagnostics Categories.
Get Diagnostics Categories.

@param resourceGroupName Name of the resource group to which the resource belongs.
@param siteName Site Name
@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;DiagnosticCategoryInner&gt; object if successful.