package com.google.graphgeckos.dashboard.api.components;

import java.util.Arrays;
import java.util.List;

public class BuildInfo {
  private final String commitHash;
  private final String timeStamp;
  private final String repository;
  private final String branch;

  private final List<Builder> passedBuilders;
  private final List<Builder> failedBuilders;

  public BuildInfo(String commitHash, String timeStamp, String repository,
                   String branch, Builder[] passedBuilders, Builder[] failedBuilders) {
    this.commitHash = commitHash;
    this.timeStamp = timeStamp;
    this.repository = repository;
    this.branch = branch;
    this.passedBuilders = Arrays.asList(passedBuilders);
    this.failedBuilders = Arrays.asList(failedBuilders);
  }

  public String getCommitHash() {
    return commitHash;
  }

  public String getTimeStamp() {
    return timeStamp;
  }

  public String getRepository() {
    return repository;
  }

  public String getBranch() {
    return branch;
  }

  public List<Builder> getPassedBuilders() {
    return passedBuilders;
  }

  public List<Builder> getFailedBuilders() {
    return failedBuilders;
  }
}

@@ -295,61 +295,9 @@
 er%3E 
-passedBuilders;%0A  private final List%3CBuilder%3E failedB
+b
 uild
@@ -425,41 +425,9 @@
 r%5B%5D 
-passedBuilders, Builder%5B%5D failedB
+b
 uild
@@ -568,23 +568,17 @@
    this.
-passedB
+b
 uilders 
@@ -597,72 +597,9 @@
 ist(
-passedBuilders);%0A    this.failedBuilders = Arrays.asList(failedB
+b
 uild
@@ -877,14 +877,8 @@
  get
-Passed
 Buil
@@ -901,92 +901,9 @@
 urn 
-passedBuilders;%0A  %7D%0A%0A  public List%3CBuilder%3E getFailedBuilders() %7B%0A    return failedB
+b
 uild
@@ -911,10 +911,11 @@
 rs;%0A  %7D%0A
+%0A
 %7D%0A

update params to reflect new response shema