| 21739 |
ashik.ali |
1 |
package com.spice.profitmandi.common.model;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDateTime;
|
|
|
4 |
|
|
|
5 |
import org.springframework.http.HttpStatus;
|
|
|
6 |
|
|
|
7 |
public class ProfitMandiResponse <T>{
|
|
|
8 |
private LocalDateTime timestamp;
|
|
|
9 |
private String url;
|
|
|
10 |
private final String statusCode;
|
|
|
11 |
private final HttpStatus statusMessage;
|
|
|
12 |
private final T response;
|
|
|
13 |
private final ResponseStatus responseStatus;
|
|
|
14 |
public ProfitMandiResponse(LocalDateTime timestamp, String url, String statusCode, HttpStatus statusMessage, ResponseStatus responseStatus, T response) {
|
|
|
15 |
this(statusCode, statusMessage, responseStatus, response);
|
|
|
16 |
//this.timestamp = timestamp;
|
|
|
17 |
this.url = url;
|
|
|
18 |
}
|
|
|
19 |
public ProfitMandiResponse(String statusCode, HttpStatus statusMessage, ResponseStatus responseStatus, T response) {
|
|
|
20 |
this.statusCode=statusCode;
|
|
|
21 |
this.statusMessage=statusMessage;
|
|
|
22 |
this.responseStatus=responseStatus;
|
|
|
23 |
this.response=response;
|
|
|
24 |
}
|
|
|
25 |
public LocalDateTime getTimestamp() {
|
|
|
26 |
return timestamp;
|
|
|
27 |
}
|
|
|
28 |
public String getUrl() {
|
|
|
29 |
return url;
|
|
|
30 |
}
|
|
|
31 |
public String getStatusCode() {
|
|
|
32 |
return statusCode;
|
|
|
33 |
}
|
|
|
34 |
public HttpStatus getStatusMessage() {
|
|
|
35 |
return statusMessage;
|
|
|
36 |
}
|
|
|
37 |
public ResponseStatus getResponseStatus() {
|
|
|
38 |
return responseStatus;
|
|
|
39 |
}
|
|
|
40 |
public T getResponse() {
|
|
|
41 |
return response;
|
|
|
42 |
}
|
|
|
43 |
}
|