1 package org.openecomp.sdc.common.http.client.api;
3 import org.apache.commons.lang3.StringUtils;
5 public class HttpResponse<T> {
6 private final T response;
7 private final int statusCode;
8 private final String description;
10 public HttpResponse(T response, int statusCode) {
11 this.response = response;
12 this.statusCode = statusCode;
13 this.description = StringUtils.EMPTY;
16 public HttpResponse(T response, int statusCode, String description) {
17 this.response = response;
18 this.statusCode = statusCode;
19 this.description = description;
22 public T getResponse() {
26 public int getStatusCode() {
30 public String getDescription() {
35 public String toString() {
36 StringBuilder builder = new StringBuilder();
37 builder.append("HttpResponse [response=");
38 builder.append(response);
39 builder.append(", statusCode=");
40 builder.append(statusCode);
41 builder.append(", description=");
42 builder.append(description);
44 return builder.toString();