Class MultipleRetriedJobsResults

java.lang.Object
org.sourcelab.buildkite.api.client.response.MultipleRetriedJobsResults

public class MultipleRetriedJobsResults extends Object
  • Constructor Details

    • MultipleRetriedJobsResults

      public MultipleRetriedJobsResults(Map<String,Job> originalJobIdsMappedToUpdatedJobs, Map<String,BuildkiteException> originalJobIdsMappedToErrors)
      Constructor.
      Parameters:
      originalJobIdsMappedToUpdatedJobs - Original Job Id mapped to the updated Job.
      originalJobIdsMappedToErrors - Original Job Id mapped to any error that occurred during the request.
  • Method Details

    • getOriginalJobIds

      public Set<String> getOriginalJobIds()
      Ids of the jobs that were retried.
      Returns:
      Ids of the jobs that were retried.
    • hasRetriedJob

      public boolean hasRetriedJob(String originalJobId)
      Check of a Retried job instance exists for the original job id.
      Parameters:
      originalJobId - Id of the job that was retried.
      Returns:
      true if an instance exists, false if not.
    • getRetriedJobByOriginalJobId

      public Job getRetriedJobByOriginalJobId(String originalJobId)
      Get the Retried job instance by the original job id.
      Parameters:
      originalJobId - Id of the job that was retried.
      Returns:
      The new Job instance.
    • getOriginalJobIdsMappedToUpdatedJobs

      public Map<String,Job> getOriginalJobIdsMappedToUpdatedJobs()
      Original Job Id mapped to the new retried job instance.
      Returns:
      Original Job Id mapped to the new retried job instance.
    • getRetriedJobs

      public List<Job> getRetriedJobs()
      All of the new retried job instances.
      Returns:
      All of the new retried job instances.
    • didJobHaveError

      public boolean didJobHaveError(String originalJobId)
      Check of a given Job id had an error.
      Parameters:
      originalJobId - Id of the job that was retried.
      Returns:
      true if an error occurred/exists, false if not.
    • getErrorByOriginalJobId

      public BuildkiteException getErrorByOriginalJobId(String originalJobId)
      Get the error associated with the original job id.
      Parameters:
      originalJobId - Id of the job that was retried.
      Returns:
      The error that occurred.
    • getOriginalJobIdsMappedToErrors

      public Map<String,BuildkiteException> getOriginalJobIdsMappedToErrors()
      Original Job Id mapped to the error associated with it.
      Returns:
      Original Job Id mapped to the error associated with it.
    • getErrors

      public List<BuildkiteException> getErrors()
      All the errors.
      Returns:
      All the errors.
    • toString

      public String toString()
      Overrides:
      toString in class Object