1
1
package com .amazonaws .services .lambda .runtime .events ;
2
2
3
3
import java .io .Serializable ;
4
+ import java .util .List ;
4
5
import java .util .Map ;
5
6
6
7
/**
@@ -13,6 +14,8 @@ public class APIGatewayProxyResponseEvent implements Serializable, Cloneable {
13
14
private Integer statusCode ;
14
15
15
16
private Map <String , String > headers ;
17
+
18
+ private Map <String , List <String >> multiValueHeaders ;
16
19
17
20
private String body ;
18
21
@@ -69,6 +72,30 @@ public APIGatewayProxyResponseEvent withHeaders(Map<String, String> headers) {
69
72
return this ;
70
73
}
71
74
75
+ /**
76
+ * @return the Http multi value headers to return in the response
77
+ */
78
+ public Map <String , List <String >> getMultiValueHeaders () {
79
+ return multiValueHeaders ;
80
+ }
81
+
82
+ /**
83
+ * @param multiValueHeaders the Http multi value headers to return in the response
84
+ */
85
+ public void setMultiValueHeaders (Map <String , List <String >> multiValueHeaders ) {
86
+ this .multiValueHeaders = multiValueHeaders ;
87
+ }
88
+
89
+ /**
90
+ *
91
+ * @param multiValueHeaders the Http multi value headers to return in the response
92
+ * @return APIGatewayProxyResponseEvent
93
+ */
94
+ public APIGatewayProxyResponseEvent withMultiValueHeaders (Map <String , List <String >> multiValueHeaders ) {
95
+ this .setMultiValueHeaders (multiValueHeaders );
96
+ return this ;
97
+ }
98
+
72
99
/**
73
100
* @return The response body
74
101
*/
@@ -130,6 +157,8 @@ public String toString() {
130
157
sb .append ("statusCode: " ).append (getStatusCode ()).append ("," );
131
158
if (getHeaders () != null )
132
159
sb .append ("headers: " ).append (getHeaders ().toString ()).append ("," );
160
+ if (getMultiValueHeaders () != null )
161
+ sb .append ("multiValueHeaders: " ).append (getMultiValueHeaders ().toString ()).append ("," );
133
162
if (getBody () != null )
134
163
sb .append ("body: " ).append (getBody ());
135
164
sb .append ("}" );
@@ -154,6 +183,10 @@ public boolean equals(Object obj) {
154
183
return false ;
155
184
if (other .getHeaders () != null && other .getHeaders ().equals (this .getHeaders ()) == false )
156
185
return false ;
186
+ if (other .getMultiValueHeaders () == null ^ this .getMultiValueHeaders () == null )
187
+ return false ;
188
+ if (other .getMultiValueHeaders () != null && other .getMultiValueHeaders ().equals (this .getMultiValueHeaders ()) == false )
189
+ return false ;
157
190
if (other .getBody () == null ^ this .getBody () == null )
158
191
return false ;
159
192
if (other .getBody () != null && other .getBody ().equals (this .getBody ()) == false )
@@ -168,6 +201,7 @@ public int hashCode() {
168
201
169
202
hashCode = prime * hashCode + ((getStatusCode () == null ) ? 0 : getStatusCode ().hashCode ());
170
203
hashCode = prime * hashCode + ((getHeaders () == null ) ? 0 : getHeaders ().hashCode ());
204
+ hashCode = prime * hashCode + ((getMultiValueHeaders () == null ) ? 0 : getMultiValueHeaders ().hashCode ());
171
205
hashCode = prime * hashCode + ((getBody () == null ) ? 0 : getBody ().hashCode ());
172
206
return hashCode ;
173
207
}
0 commit comments