code: public PagedList<DataMigrationServiceInner> listByResourceGroup(final String groupName) {
          ServiceResponse<Page<DataMigrationServiceInner>> response = listByResourceGroupSinglePageAsync(groupName).toBlocking().single();
          return new PagedList<DataMigrationServiceInner>(response.body()) {
              @Override
              public Page<DataMigrationServiceInner> nextPage(String nextPageLink) {
                  return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
              }
          };
      }
docs: Get services in resource group.
  The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group.
  
  @param groupName Name of the resource group
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws ApiErrorException 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;DataMigrationServiceInner&gt; object if successful.