Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class APIGatewayProxyRequestEvent implements Serializable, Cloneable {

private static final long serialVersionUID = 4189228800688527467L;

private String version;

private String resource;

private String path;
Expand Down Expand Up @@ -903,6 +905,29 @@ public RequestIdentity clone() {
*/
public APIGatewayProxyRequestEvent() {}

/**
* @return The payload format version
*/
public String getVersion() {
return version;
}

/**
* @param version The payload format version
*/
public void setVersion(String version) {
this.version = version;
}

/**
* @param version The payload format version
* @return
*/
public APIGatewayProxyRequestEvent withVersion(String version) {
this.setVersion(version);
return this;
}

/**
* @return The resource path defined in API Gateway
*/
Expand Down Expand Up @@ -1206,6 +1231,8 @@ public APIGatewayProxyRequestEvent withIsBase64Encoded(Boolean isBase64Encoded)
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getVersion() != null)
sb.append("version: ").append(getVersion()).append(",");
if (getResource() != null)
sb.append("resource: ").append(getResource()).append(",");
if (getPath() != null)
Expand Down Expand Up @@ -1244,6 +1271,10 @@ public boolean equals(Object obj) {
if (obj instanceof APIGatewayProxyRequestEvent == false)
return false;
APIGatewayProxyRequestEvent other = (APIGatewayProxyRequestEvent) obj;
if (other.getVersion() == null ^ this.getVersion() == null)
return false;
if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false)
return false;
if (other.getResource() == null ^ this.getResource() == null)
return false;
if (other.getResource() != null && other.getResource().equals(this.getResource()) == false)
Expand Down Expand Up @@ -1300,6 +1331,7 @@ public int hashCode() {
final int prime = 31;
int hashCode = 1;

hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getResource() == null) ? 0 : getResource().hashCode());
hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode());
hashCode = prime * hashCode + ((getHttpMethod() == null) ? 0 : getHttpMethod().hashCode());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"version": "1.0",
"path": "/test/hello",
"headers": {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
Expand Down