Merge from ecomp 718fd196 - Ext. Services Simulator
[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
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 boolean strict;
16     private Map<String,String> headers;
17
18     private Map<String, List<String>> queryParams;
19
20     public Map<String, List<String>> getQueryParams() {
21         return queryParams;
22     }
23
24     public void setQueryParams(Map<String, List<String>> queryParams) {
25         this.queryParams = queryParams;
26     }
27
28     public String getId() {
29         return id;
30     }
31
32     public void setId(String id) {
33         this.id = id;
34     }
35
36     public String getMethod() {
37         return method;
38     }
39
40     public void setMethod(String method) {
41         this.method = method;
42     }
43
44     public String getPath() {
45         return path;
46     }
47
48     public void setPath(String path) {
49         this.path = path;
50     }
51
52     public String getBody() {
53         return body;
54     }
55
56     public void setBody(JsonNode body) {
57         this.body = body.isTextual() ? body.textValue() : body.toString();
58     }
59
60     public boolean getStrict() {
61         return strict;
62     }
63
64     public void setStrict(boolean strict) {
65         this.strict = strict;
66     }
67
68     public Map<String, String> getHeaders() {
69         return headers;
70     }
71
72     public void setHeaders(Map<String, String> headers) {
73         this.headers = headers;
74     }
75
76     @Override
77     public String toString() {
78         return "SimulatorRequest{" +
79                 "id='" + id + '\'' +
80                 ", method='" + method + '\'' +
81                 ", path='" + path + '\'' +
82                 ", body='" + body + '\'' +
83                 ", queryParams=" + queryParams +
84                 '}';
85     }
86 }