// Path: repository/bamboo/api/src/main/java/com/github/zutherb/buildlight/respository/bamboo/api/BambooRepository.java
// public interface BambooRepository extends BuildServerRepository {
//     BambooResultResponse getResultResponse();
// 
//     BambooPlanResponse getPlanResponse();
// }
// 
// Path: repository/bamboo/model/src/main/java/com/github/zutherb/buildlight/respository/bamboo/model/BambooPlanResponse.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class BambooPlanResponse extends Plan {
//     private String expand;
//     @JsonProperty("isFavourite")
//     private boolean isFavourite;
//     @JsonProperty("isActive")
//     private boolean isActive;
//     @JsonProperty("isBuilding")
//     private boolean isBuilding;
//     private int averageBuildTimeInSeconds;
//     private com.github.zutherb.buildlight.respository.bamboo.model.Metrics actions;
//     private Metrics stages;
//     private Metrics branches;
//     private Metrics variableContext;
// 
//     public String getExpand() {
//         return expand;
//     }
// 
//     public boolean isFavourite() {
//         return isFavourite;
//     }
// 
//     public boolean isActive() {
//         return isActive;
//     }
// 
//     public boolean isBuilding() {
//         return isBuilding;
//     }
// 
//     public int getAverageBuildTimeInSeconds() {
//         return averageBuildTimeInSeconds;
//     }
// 
//     public Metrics getActions() {
//         return actions;
//     }
// 
//     public Metrics getStages() {
//         return stages;
//     }
// 
//     public Metrics getBranches() {
//         return branches;
//     }
// 
//     public Metrics getVariableContext() {
//         return variableContext;
//     }
// }
// 
// Path: repository/bamboo/model/src/main/java/com/github/zutherb/buildlight/respository/bamboo/model/BambooResultResponse.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class BambooResultResponse {
//     private Results results;
//     private String expand;
//     private Link link;
// 
//     public Results getResults() {
//         return results;
//     }
// 
//     public void setResults(Results results) {
//         this.results = results;
//     }
// 
//     public String getExpand() {
//         return expand;
//     }
// 
//     public void setExpand(String expand) {
//         this.expand = expand;
//     }
// 
//     public Link getLink() {
//         return link;
//     }
// 
//     public void setLink(Link link) {
//         this.link = link;
//     }
// 
//     public static class Builder {
// 
//         private BambooResultResponse response = new BambooResultResponse();
// 
//         public Builder results(Results results) {
//             response.results = results;
//             return this;
//         }
// 
//         public BambooResultResponse build() {
//             return response;
//         }
//     }
// }


import com.github.zutherb.buildlight.respository.bamboo.api.BambooRepository;
import com.github.zutherb.buildlight.respository.bamboo.model.BambooPlanResponse;
import com.github.zutherb.buildlight.respository.bamboo.model.BambooResultResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriTemplate;
import java.net.URI;
package com.github.zutherb.buildlight.respository.bamboo.impl;



/**
 * @author zutherb
 */
@Component
public class BambooRepositoryImpl implements BambooRepository {
    private final String BAMBOO_RESULT_URL = "{serverUrl}/rest/api/latest/result/{buildKey}.json?os_authType=basic&os_username={username}&os_password={password}";
// Path: repository/bamboo/api/src/main/java/com/github/zutherb/buildlight/respository/bamboo/api/BambooRepository.java
// public interface BambooRepository extends BuildServerRepository {
//     BambooResultResponse getResultResponse();
// 
//     BambooPlanResponse getPlanResponse();
// }
// 
// Path: repository/bamboo/model/src/main/java/com/github/zutherb/buildlight/respository/bamboo/model/BambooPlanResponse.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class BambooPlanResponse extends Plan {
//     private String expand;
//     @JsonProperty("isFavourite")
//     private boolean isFavourite;
//     @JsonProperty("isActive")
//     private boolean isActive;
//     @JsonProperty("isBuilding")
//     private boolean isBuilding;
//     private int averageBuildTimeInSeconds;
//     private com.github.zutherb.buildlight.respository.bamboo.model.Metrics actions;
//     private Metrics stages;
//     private Metrics branches;
//     private Metrics variableContext;
// 
//     public String getExpand() {
//         return expand;
//     }
// 
//     public boolean isFavourite() {
//         return isFavourite;
//     }
// 
//     public boolean isActive() {
//         return isActive;
//     }
// 
//     public boolean isBuilding() {
//         return isBuilding;
//     }
// 
//     public int getAverageBuildTimeInSeconds() {
//         return averageBuildTimeInSeconds;
//     }
// 
//     public Metrics getActions() {
//         return actions;
//     }
// 
//     public Metrics getStages() {
//         return stages;
//     }
// 
//     public Metrics getBranches() {
//         return branches;
//     }
// 
//     public Metrics getVariableContext() {
//         return variableContext;
//     }
// }
// 
// Path: repository/bamboo/model/src/main/java/com/github/zutherb/buildlight/respository/bamboo/model/BambooResultResponse.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class BambooResultResponse {
//     private Results results;
//     private String expand;
//     private Link link;
// 
//     public Results getResults() {
//         return results;
//     }
// 
//     public void setResults(Results results) {
//         this.results = results;
//     }
// 
//     public String getExpand() {
//         return expand;
//     }
// 
//     public void setExpand(String expand) {
//         this.expand = expand;
//     }
// 
//     public Link getLink() {
//         return link;
//     }
// 
//     public void setLink(Link link) {
//         this.link = link;
//     }
// 
//     public static class Builder {
// 
//         private BambooResultResponse response = new BambooResultResponse();
// 
//         public Builder results(Results results) {
//             response.results = results;
//             return this;
//         }
// 
//         public BambooResultResponse build() {
//             return response;
//         }
//     }
// }


// Path: repository/bamboo/impl/src/main/java/com/github/zutherb/buildlight/respository/bamboo/impl/BambooRepositoryImpl.java
import com.github.zutherb.buildlight.respository.bamboo.api.BambooRepository;
import com.github.zutherb.buildlight.respository.bamboo.model.BambooPlanResponse;
import com.github.zutherb.buildlight.respository.bamboo.model.BambooResultResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriTemplate;
import java.net.URI;

package com.github.zutherb.buildlight.respository.bamboo.impl;



/**
 * @author zutherb
 */
@Component
public class BambooRepositoryImpl implements BambooRepository {
    private final String BAMBOO_RESULT_URL = "{serverUrl}/rest/api/latest/result/{buildKey}.json?os_authType=basic&os_username={username}&os_password={password}";
    private final String BAMBOO_PLAN_URL = "{serverUrl}/rest/api/latest/plan/{buildKey}.json?os_authType=basic&os_username={username}&os_password={password}";