code: public Observable<ServiceResponse<Page<JobTargetGroupInner>>> listByAgentSinglePageAsync(final String resourceGroupName, final String serverName, final String jobAgentName) {
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (serverName == null) {
              throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
          }
          if (jobAgentName == null) {
              throw new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.");
          }
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          return service.listByAgent(resourceGroupName, serverName, jobAgentName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<JobTargetGroupInner>>>>() {
                  @Override
                  public Observable<ServiceResponse<Page<JobTargetGroupInner>>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<PageImpl<JobTargetGroupInner>> result = listByAgentDelegate(response);
                          return Observable.just(new ServiceResponse<Page<JobTargetGroupInner>>(result.body(), result.response()));
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Gets all target groups in an agent.
  
  ServiceResponse<PageImpl<JobTargetGroupInner>> * @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.
  ServiceResponse<PageImpl<JobTargetGroupInner>> * @param serverName The name of the server.
  ServiceResponse<PageImpl<JobTargetGroupInner>> * @param jobAgentName The name of the job agent.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the PagedList&lt;JobTargetGroupInner&gt; object wrapped in {@link ServiceResponse} if successful.