@@ -11,6 +11,8 @@ public class APIGatewayProxyRequestEvent implements Serializable, Cloneable {
1111
1212 private static final long serialVersionUID = 4189228800688527467L ;
1313
14+ private String version ;
15+
1416 private String resource ;
1517
1618 private String path ;
@@ -903,6 +905,29 @@ public RequestIdentity clone() {
903905 */
904906 public APIGatewayProxyRequestEvent () {}
905907
908+ /**
909+ * @return The payload format version
910+ */
911+ public String getVersion () {
912+ return version ;
913+ }
914+
915+ /**
916+ * @param version The payload format version
917+ */
918+ public void setVersion (String version ) {
919+ this .version = version ;
920+ }
921+
922+ /**
923+ * @param version The payload format version
924+ * @return
925+ */
926+ public APIGatewayProxyRequestEvent withVersion (String version ) {
927+ this .setVersion (version );
928+ return this ;
929+ }
930+
906931 /**
907932 * @return The resource path defined in API Gateway
908933 */
@@ -1206,6 +1231,8 @@ public APIGatewayProxyRequestEvent withIsBase64Encoded(Boolean isBase64Encoded)
12061231 public String toString () {
12071232 StringBuilder sb = new StringBuilder ();
12081233 sb .append ("{" );
1234+ if (getVersion () != null )
1235+ sb .append ("version: " ).append (getVersion ()).append ("," );
12091236 if (getResource () != null )
12101237 sb .append ("resource: " ).append (getResource ()).append ("," );
12111238 if (getPath () != null )
@@ -1244,6 +1271,10 @@ public boolean equals(Object obj) {
12441271 if (obj instanceof APIGatewayProxyRequestEvent == false )
12451272 return false ;
12461273 APIGatewayProxyRequestEvent other = (APIGatewayProxyRequestEvent ) obj ;
1274+ if (other .getVersion () == null ^ this .getVersion () == null )
1275+ return false ;
1276+ if (other .getVersion () != null && other .getVersion ().equals (this .getVersion ()) == false )
1277+ return false ;
12471278 if (other .getResource () == null ^ this .getResource () == null )
12481279 return false ;
12491280 if (other .getResource () != null && other .getResource ().equals (this .getResource ()) == false )
@@ -1300,6 +1331,7 @@ public int hashCode() {
13001331 final int prime = 31 ;
13011332 int hashCode = 1 ;
13021333
1334+ hashCode = prime * hashCode + ((getVersion () == null ) ? 0 : getVersion ().hashCode ());
13031335 hashCode = prime * hashCode + ((getResource () == null ) ? 0 : getResource ().hashCode ());
13041336 hashCode = prime * hashCode + ((getPath () == null ) ? 0 : getPath ().hashCode ());
13051337 hashCode = prime * hashCode + ((getHttpMethod () == null ) ? 0 : getHttpMethod ().hashCode ());
0 commit comments