blob: 5e1197e7f7aa6258ee54390a1dc320b6fd1af540 [file] [log] [blame]
/*-
* ============LICENSE_START=======================================================
* OSAM
* ================================================================================
* Copyright (C) 2018 AT&T
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
*/
package org.onap.simulator.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.JsonNode;
import java.util.List;
import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SimulatorRequest {
private String id;
private String method;
private String path;
private String body;
private Map<String, List<String>> queryParams;
public Map<String, List<String>> getQueryParams() {
return queryParams;
}
public void setQueryParams(Map<String, List<String>> queryParams) {
this.queryParams = queryParams;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getBody() {
return body;
}
public void setBody(JsonNode body) {
this.body = body.isTextual() ? body.textValue() : body.toString();
}
@Override
public String toString() {
return "SimulatorRequest{" +
"id='" + id + '\'' +
", method='" + method + '\'' +
", path='" + path + '\'' +
", body='" + body + '\'' +
", queryParams=" + queryParams +
'}';
}
}