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

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

// Represents the response json with the aggregated buildbot data.
public class BuildInfo {

  // git commit hash of the tested changes commit
  private final String commitHash;
  // time of receiving build info
  private final Date timestamp;
  // link to to the git repository where the tested changes were made
  private final String repository;
  // name of the git branch where the tested changes were made
  private final String branch;

  // builders which tested the changes
  private final List<Builder> builders;

  public BuildInfo(String commitHash, Date timestamp, String repository,
                   String branch, List<Builder> builders) {
    this.commitHash = commitHash;
    this.timestamp = timestamp;
    this.repository = repository;
    this.branch = branch;
    this.builders = new ArrayList<>(builders);
  }

  public String getCommitHash() {
    return commitHash;
  }

  public Date getTimestamp() {
    return timestamp;
  }

  public String getRepository() {
    return repository;
  }

  public String getBranch() {
    return branch;
  }

  public List<Builder> getBuilders() {
    return builders;
  }

}

@@ -127,17 +127,21 @@
 List;%0A%0A/
-/
+**%0A *
  Represe
@@ -197,16 +197,20 @@
 t data.%0A
+ */%0A
 public c
@@ -251,37 +251,8 @@
 hash
- of the tested changes commit
 %0A  p
@@ -369,20 +369,16 @@
  to the 
-git 
 reposito
@@ -383,43 +383,8 @@
 tory
- where the tested changes were made
 %0A  p
@@ -436,53 +436,14 @@
 the 
-git 
 branch
- where the tested changes were made
 %0A  p
@@ -488,33 +488,8 @@
 ders
- which tested the changes
 %0A  p
@@ -833,24 +833,95 @@
 ders);%0A  %7D%0A%0A
+%0A  /**%0A   * @return git commit hash of the tested changes commit%0A   */%0A
   public Str
@@ -962,32 +962,86 @@
 ommitHash;%0A  %7D%0A%0A
+  /**%0A   * @return time of receiving build info%0A   */%0A
   public Date ge
@@ -1088,121 +1088,353 @@
 %0A%0A  
-public String getRepository() %7B%0A    return repository;%0A  %7D%0A%0A  public String getBranch() %7B%0A    return branch;%0A  %7D%0A
+/**%0A   * @return link to to the git repository where the tested changes were made%0A   */%0A  public String getRepository() %7B%0A    return repository;%0A  %7D%0A%0A  /**%0A   * @return name of the git branch where the tested changes were made%0A   */%0A  public String getBranch() %7B%0A    return branch;%0A  %7D%0A%0A  /**%0A   * @return builders which tested the changes%0A   */
 %0A  p

add javadocs for getters