@@ -7,6 +7,10 @@ use crate::{
77use http:: { HeaderMap , Method } ;
88use query_map:: QueryMap ;
99use serde:: { Deserialize , Serialize } ;
10+ #[ cfg( feature = "catch-all-fields" ) ]
11+ use serde_json:: Value ;
12+ #[ cfg( feature = "catch-all-fields" ) ]
13+ use std:: collections:: HashMap ;
1014
1115/// `AlbTargetGroupRequest` contains data originating from the ALB Lambda target group integration
1216#[ derive( Clone , Debug , Default , Deserialize , PartialEq , Serialize ) ]
@@ -30,13 +34,25 @@ pub struct AlbTargetGroupRequest {
3034 #[ serde( default , deserialize_with = "deserialize_nullish_boolean" ) ]
3135 pub is_base64_encoded : bool ,
3236 pub body : Option < String > ,
37+ /// Catchall to catch any additional fields that were present but not expected by this struct.
38+ /// Enabled with Cargo feature `catch-all-fields`.
39+ /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
40+ #[ cfg( feature = "catch-all-fields" ) ]
41+ #[ serde( flatten) ]
42+ pub other : HashMap < String , Value > ,
3343}
3444
3545/// `AlbTargetGroupRequestContext` contains the information to identify the load balancer invoking the lambda
3646#[ derive( Clone , Debug , Default , Deserialize , Eq , PartialEq , Serialize ) ]
3747#[ serde( rename_all = "camelCase" ) ]
3848pub struct AlbTargetGroupRequestContext {
3949 pub elb : ElbContext ,
50+ /// Catchall to catch any additional fields that were present but not expected by this struct.
51+ /// Enabled with Cargo feature `catch-all-fields`.
52+ /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
53+ #[ cfg( feature = "catch-all-fields" ) ]
54+ #[ serde( flatten) ]
55+ pub other : HashMap < String , Value > ,
4056}
4157
4258/// `ElbContext` contains the information to identify the ARN invoking the lambda
@@ -46,6 +62,12 @@ pub struct ElbContext {
4662 /// nolint: stylecheck
4763 #[ serde( default ) ]
4864 pub target_group_arn : Option < String > ,
65+ /// Catchall to catch any additional fields that were present but not expected by this struct.
66+ /// Enabled with Cargo feature `catch-all-fields`.
67+ /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
68+ #[ cfg( feature = "catch-all-fields" ) ]
69+ #[ serde( flatten) ]
70+ pub other : HashMap < String , Value > ,
4971}
5072
5173/// `AlbTargetGroupResponse` configures the response to be returned by the ALB Lambda target group for the request
@@ -65,6 +87,12 @@ pub struct AlbTargetGroupResponse {
6587 pub body : Option < Body > ,
6688 #[ serde( default , deserialize_with = "deserialize_nullish_boolean" ) ]
6789 pub is_base64_encoded : bool ,
90+ /// Catchall to catch any additional fields that were present but not expected by this struct.
91+ /// Enabled with Cargo feature `catch-all-fields`.
92+ /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
93+ #[ cfg( feature = "catch-all-fields" ) ]
94+ #[ serde( flatten) ]
95+ pub other : HashMap < String , Value > ,
6896}
6997
7098#[ cfg( test) ]
0 commit comments