code: public PagedList<HybridRunbookWorkerGroupInner> listByAutomationAccount(final String resourceGroupName, final String automationAccountName) {
          ServiceResponse<Page<HybridRunbookWorkerGroupInner>> response = listByAutomationAccountSinglePageAsync(resourceGroupName, automationAccountName).toBlocking().single();
          return new PagedList<HybridRunbookWorkerGroupInner>(response.body()) {
              @Override
              public Page<HybridRunbookWorkerGroupInner> nextPage(String nextPageLink) {
                  return listByAutomationAccountNextSinglePageAsync(nextPageLink).toBlocking().single().body();
              }
          };
      }
docs: Retrieve a list of hybrid runbook worker groups.
  
  @param resourceGroupName Name of an Azure Resource group.
  @param automationAccountName The name of the automation account.
  @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&lt;HybridRunbookWorkerGroupInner&gt; object if successful.