org.onap migration
[vid.git] / vid-ext-services-simulator / src / main / java / org / openecomp / simulator / model / SimulatorRequest.java
1 package org.openecomp.simulator.model;
2
3 import com.fasterxml.jackson.annotation.JsonInclude;
4 import com.fasterxml.jackson.databind.JsonNode;
5
6 import java.util.List;
7 import java.util.Map;
8
9 @JsonInclude(JsonInclude.Include.NON_NULL)
10 public class SimulatorRequest {
11     private String id;
12     private String method;
13     private String path;
14     private String body;
15     private Map<String, List<String>> queryParams;
16
17     public Map<String, List<String>> getQueryParams() {
18         return queryParams;
19     }
20
21     public void setQueryParams(Map<String, List<String>> queryParams) {
22         this.queryParams = queryParams;
23     }
24
25     public String getId() {
26         return id;
27     }
28
29     public void setId(String id) {
30         this.id = id;
31     }
32
33     public String getMethod() {
34         return method;
35     }
36
37     public void setMethod(String method) {
38         this.method = method;
39     }
40
41     public String getPath() {
42         return path;
43     }
44
45     public void setPath(String path) {
46         this.path = path;
47     }
48
49     public String getBody() {
50         return body;
51     }
52
53     public void setBody(JsonNode body) {
54         this.body = body.isTextual() ? body.textValue() : body.toString();
55     }
56
57     @Override
58     public String toString() {
59         return "SimulatorRequest{" +
60                 "id='" + id + '\'' +
61                 ", method='" + method + '\'' +
62                 ", path='" + path + '\'' +
63                 ", body='" + body + '\'' +
64                 ", queryParams=" + queryParams +
65                 '}';
66     }
67 }