code: public ServiceFuture<List<JobTargetGroupInner>> listByAgentAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final ListOperationCallback<JobTargetGroupInner> serviceCallback) {
          return AzureServiceFuture.fromPageResponse(
              listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName),
              new Func1<String, Observable<ServiceResponse<Page<JobTargetGroupInner>>>>() {
                  @Override
                  public Observable<ServiceResponse<Page<JobTargetGroupInner>>> call(String nextPageLink) {
                      return listByAgentNextSinglePageAsync(nextPageLink);
                  }
              },
              serviceCallback);
      }
docs: Gets all target groups in an agent.
  
  @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  @param serverName The name of the server.
  @param jobAgentName The name of the job agent.
  @param serviceCallback the async ServiceCallback to handle successful and failed responses.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the {@link ServiceFuture} object