@@ -7,6 +7,8 @@ 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 ;
1012
1113/// `AlbTargetGroupRequest` contains data originating from the ALB Lambda target group integration
1214#[ derive( Clone , Debug , Default , Deserialize , PartialEq , Serialize ) ]
@@ -30,13 +32,27 @@ pub struct AlbTargetGroupRequest {
3032 #[ serde( default , deserialize_with = "deserialize_nullish_boolean" ) ]
3133 pub is_base64_encoded : bool ,
3234 pub body : Option < String > ,
35+ /// Catchall to catch any additional fields that were present but not explicitly defined by this struct.
36+ /// Enabled with Cargo feature `catch-all-fields`.
37+ /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
38+ #[ cfg( feature = "catch-all-fields" ) ]
39+ #[ cfg_attr( docsrs, doc( cfg( feature = "catch-all-fields" ) ) ) ]
40+ #[ serde( flatten) ]
41+ pub other : serde_json:: Map < String , Value > ,
3342}
3443
3544/// `AlbTargetGroupRequestContext` contains the information to identify the load balancer invoking the lambda
3645#[ derive( Clone , Debug , Default , Deserialize , Eq , PartialEq , Serialize ) ]
3746#[ serde( rename_all = "camelCase" ) ]
3847pub struct AlbTargetGroupRequestContext {
3948 pub elb : ElbContext ,
49+ /// Catchall to catch any additional fields that were present but not explicitly defined by this struct.
50+ /// Enabled with Cargo feature `catch-all-fields`.
51+ /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
52+ #[ cfg( feature = "catch-all-fields" ) ]
53+ #[ cfg_attr( docsrs, doc( cfg( feature = "catch-all-fields" ) ) ) ]
54+ #[ serde( flatten) ]
55+ pub other : serde_json:: Map < String , Value > ,
4056}
4157
4258/// `ElbContext` contains the information to identify the ARN invoking the lambda
@@ -46,6 +62,13 @@ 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 explicitly defined 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+ #[ cfg_attr( docsrs, doc( cfg( feature = "catch-all-fields" ) ) ) ]
70+ #[ serde( flatten) ]
71+ pub other : serde_json:: Map < String , Value > ,
4972}
5073
5174/// `AlbTargetGroupResponse` configures the response to be returned by the ALB Lambda target group for the request
@@ -65,6 +88,13 @@ pub struct AlbTargetGroupResponse {
6588 pub body : Option < Body > ,
6689 #[ serde( default , deserialize_with = "deserialize_nullish_boolean" ) ]
6790 pub is_base64_encoded : bool ,
91+ /// Catchall to catch any additional fields that were present but not explicitly defined by this struct.
92+ /// Enabled with Cargo feature `catch-all-fields`.
93+ /// If `catch-all-fields` is disabled, any additional fields that are present will be ignored.
94+ #[ cfg( feature = "catch-all-fields" ) ]
95+ #[ cfg_attr( docsrs, doc( cfg( feature = "catch-all-fields" ) ) ) ]
96+ #[ serde( flatten) ]
97+ pub other : serde_json:: Map < String , Value > ,
6898}
6999
70100#[ cfg( test) ]
0 commit comments