code: func (client *Client) PollJob(job Job) (Warnings, error) {
  	originalJobGUID := job.GUID
  
  	var (
  		err         error
  		warnings    Warnings
  		allWarnings Warnings
  	)
  
  	startTime := time.Now()
  	for time.Now().Sub(startTime) < client.jobPollingTimeout {
  		job, warnings, err = client.GetJob(job.GUID)
  		allWarnings = append(allWarnings, Warnings(warnings)...)
  		if err != nil {
  			return allWarnings, err
  		}
  
  		if job.Failed() {
  			return allWarnings, ccerror.V2JobFailedError{
  				JobGUID: originalJobGUID,
  				Message: job.ErrorDetails.Description,
  			}
  		}
  
  		if job.Finished() {
  			return allWarnings, nil
  		}
  
  		time.Sleep(client.jobPollingInterval)
  	}
  
  	return allWarnings, ccerror.JobTimeoutError{
  		JobGUID: originalJobGUID,
  		Timeout: client.jobPollingTimeout,
  	}
  }
docs: // PollJob will keep polling the given job until the job has terminated, an
  // error is encountered, or config.OverallPollingTimeout is reached. In the
  // last case, a JobTimeoutError is returned.