aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/aai/AaiResponse.java
blob: c4b19b134a06d153eb28c84eecd5c73f108dfb2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.onap.vid.aai;

import com.google.common.base.MoreObjects;
import org.onap.vid.model.ProxyResponse;

/**
 * Created by Oren on 7/10/17.
 */
public class AaiResponse<T> extends ProxyResponse{

    T t;

    public AaiResponse() {
    }

    public AaiResponse(T t, String errorMessage, int aaiHttpCode) {
        this.t = t;
        this.errorMessage = errorMessage;
        this.httpCode = aaiHttpCode;
    }

    public T getT() {
        return t;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("httpCode", httpCode)
                .add("errorMessage", errorMessage)
                .add("t", t)
                .toString();
    }
}