com.ksc.network.eip.model.transform.GetLinesRequestMarshaller Maven / Gradle / Ivy
package com.ksc.network.eip.model.transform;
import com.ksc.DefaultRequest;
import com.ksc.KscClientException;
import com.ksc.Request;
import com.ksc.http.HttpMethodName;
import com.ksc.network.eip.model.GetLinesRequest;
import com.ksc.transform.Marshaller;
import com.ksc.util.StringUtils;
public class GetLinesRequestMarshaller implements Marshaller, GetLinesRequest> {
@Override
public Request marshall(GetLinesRequest getLinesRequest) {
// TODO Auto-generated method stub
if (getLinesRequest == null) {
throw new KscClientException(
"Invalid argument passed to marshall(...)");
}
Request request = new DefaultRequest(
getLinesRequest, "eip");
request.addParameter("Action", "GetLines");
String version=getLinesRequest.getVersion();
if(StringUtils.isNullOrEmpty(version)){
version="2016-03-04";
}
request.addParameter("Version", version);
request.setHttpMethod(HttpMethodName.GET);
return request;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy