package helloworld; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * POJO containing response object for API Gateway. */ public class GatewayResponse { private final String body; private final Map headers; private final int statusCode; public GatewayResponse(final String body, final Map headers, final int statusCode) { this.statusCode = statusCode; this.body = body; this.headers = Collections.unmodifiableMap(new HashMap<>(headers)); } public String getBody() { return body; } public Map getHeaders() { return headers; } public int getStatusCode() { return statusCode; } }