code: public final CheckValidCredsResponse checkValidCreds(DataSourceName name) {
  
      CheckValidCredsRequest request =
          CheckValidCredsRequest.newBuilder().setName(name == null ? null : name.toString()).build();
      return checkValidCreds(request);
    }
docs: Returns true if valid credentials exist for the given data source and requesting user. Some
  data sources doesn't support service account, so we need to talk to them on behalf of the end
  user. This API just checks whether we have OAuth token for the particular user, which is a
  pre-requisite before user can create a transfer config.
  
  <p>Sample code:
  
  <pre><code>
  try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
  DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
  CheckValidCredsResponse response = dataTransferServiceClient.checkValidCreds(name);
  }
  </code></pre>
  
  @param name The data source in the form: `projects/{project_id}/dataSources/{data_source_id}`
  @throws com.google.api.gax.rpc.ApiException if the remote call fails