@@ -11,6 +11,8 @@ public class APIGatewayProxyRequestEvent implements Serializable, Cloneable {
11
11
12
12
private static final long serialVersionUID = 4189228800688527467L ;
13
13
14
+ private String version ;
15
+
14
16
private String resource ;
15
17
16
18
private String path ;
@@ -903,6 +905,29 @@ public RequestIdentity clone() {
903
905
*/
904
906
public APIGatewayProxyRequestEvent () {}
905
907
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
+
906
931
/**
907
932
* @return The resource path defined in API Gateway
908
933
*/
@@ -1206,6 +1231,8 @@ public APIGatewayProxyRequestEvent withIsBase64Encoded(Boolean isBase64Encoded)
1206
1231
public String toString () {
1207
1232
StringBuilder sb = new StringBuilder ();
1208
1233
sb .append ("{" );
1234
+ if (getVersion () != null )
1235
+ sb .append ("version: " ).append (getVersion ()).append ("," );
1209
1236
if (getResource () != null )
1210
1237
sb .append ("resource: " ).append (getResource ()).append ("," );
1211
1238
if (getPath () != null )
@@ -1244,6 +1271,10 @@ public boolean equals(Object obj) {
1244
1271
if (obj instanceof APIGatewayProxyRequestEvent == false )
1245
1272
return false ;
1246
1273
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 ;
1247
1278
if (other .getResource () == null ^ this .getResource () == null )
1248
1279
return false ;
1249
1280
if (other .getResource () != null && other .getResource ().equals (this .getResource ()) == false )
@@ -1300,6 +1331,7 @@ public int hashCode() {
1300
1331
final int prime = 31 ;
1301
1332
int hashCode = 1 ;
1302
1333
1334
+ hashCode = prime * hashCode + ((getVersion () == null ) ? 0 : getVersion ().hashCode ());
1303
1335
hashCode = prime * hashCode + ((getResource () == null ) ? 0 : getResource ().hashCode ());
1304
1336
hashCode = prime * hashCode + ((getPath () == null ) ? 0 : getPath ().hashCode ());
1305
1337
hashCode = prime * hashCode + ((getHttpMethod () == null ) ? 0 : getHttpMethod ().hashCode ());
0 commit comments