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