diff options
author | 2018-08-22 09:35:17 +0000 | |
---|---|---|
committer | 2018-08-22 09:35:17 +0000 | |
commit | 3fd63d35ff8eef56e139c403beea776067cc2029 (patch) | |
tree | 86e54b8e331b011d199a483da68967ce1890132b /vid-ext-services-simulator/src/main/java/org/onap/simulator/model/SimulatorResponse.java | |
parent | d47fd3bfc9aa456091c356122d149166e853f953 (diff) | |
parent | 9c2c7e8ce83b8dfda0b4c1fbd875c9c34caf51eb (diff) |
Merge "Rename vid-simulator packages"
Diffstat (limited to 'vid-ext-services-simulator/src/main/java/org/onap/simulator/model/SimulatorResponse.java')
-rw-r--r-- | vid-ext-services-simulator/src/main/java/org/onap/simulator/model/SimulatorResponse.java | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/vid-ext-services-simulator/src/main/java/org/onap/simulator/model/SimulatorResponse.java b/vid-ext-services-simulator/src/main/java/org/onap/simulator/model/SimulatorResponse.java new file mode 100644 index 000000000..4836185f9 --- /dev/null +++ b/vid-ext-services-simulator/src/main/java/org/onap/simulator/model/SimulatorResponse.java @@ -0,0 +1,59 @@ +package org.onap.simulator.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.JsonNode; + +import java.util.Map; + +public class SimulatorResponse { + private int responseCode; + private Map<String, String> responseHeaders; + + @JsonInclude(JsonInclude.Include.NON_NULL) + private String body; + + @JsonInclude(JsonInclude.Include.NON_NULL) + private String file; + + public int getResponseCode() { + return responseCode; + } + + public void setResponseCode(int responseCode) { + this.responseCode = responseCode; + } + + public String getBody() { + return body; + } + + public void setBody(JsonNode body) { + this.body = body.isTextual() ? body.textValue() : body.toString(); + } + + public Map<String, String> getResponseHeaders() { + return responseHeaders; + } + + public void setResponseHeaders(Map<String, String> responseHeaders) { + this.responseHeaders = responseHeaders; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + @Override + public String toString() { + return "SimulatorResponse{" + + "responseCode=" + responseCode + + ", body='" + body + '\'' + + ", file='" + file + '\'' + + ", responseHeaders='" + responseHeaders + '\'' + + '}'; + } +} |