Repository: aws/aws-lambda-dotnet (csharp)

Issue:
KinesisFirehoseResponse missing Metadata field
### Describe the feature

The `metadata` field of [KinesisFirehoseResponse](https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.KinesisFirehoseEvents/KinesisFirehoseResponse.cs) is used for the [dynamic partitioning](https://docs.aws.amazon.com/firehose/latest/dev/dynamic-partitioning.html) feature in Kinesis Firehose 

Reference implementation in golang https://github.com/aws/aws-lambda-go/blob/1ba09afd7523e0d5a8a2e2fb58ddb8ec8b92ebb7/events/firehose.go#L36-L41 added in https://github.com/aws/aws-lambda-go/pull/395

### Use Case

Used to extract partition keys/values for [dynamic partitioning](https://docs.aws.amazon.com/firehose/latest/dev/dynamic-partitioning.html) feature in Kinesis Firehose 

### Proposed Solution

Add KinesisFirehoseResponseRecordMetadata class with field `partitionKeys` as `Dictionary<string, string>`

### Other Information

_No response_

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS .NET SDK and/or Package version used

Amazon.Lambda.KinesisFirehoseEvents 2.1.0

### Targeted .NET Platform

.net 6

### Operating System and version

AmazonLinux

Pull request description:
Fixes https://github.com/aws/aws-lambda-dotnet/issues/1345

Adds metadata to KinesisFirehose response record to support dynamic partitioning https://docs.aws.amazon.com/firehose/latest/dev/dynamic-partitioning.html


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Patch:
diff --git a/Libraries/src/Amazon.Lambda.KinesisFirehoseEvents/KinesisFirehoseResponse.cs b/Libraries/src/Amazon.Lambda.KinesisFirehoseEvents/KinesisFirehoseResponse.cs
index 76d9fcb81..3c9a31681 100644
--- a/Libraries/src/Amazon.Lambda.KinesisFirehoseEvents/KinesisFirehoseResponse.cs
+++ b/Libraries/src/Amazon.Lambda.KinesisFirehoseEvents/KinesisFirehoseResponse.cs
@@ -92,6 +92,16 @@ public class FirehoseRecord
 #endif
             public string Base64EncodedData { get; set; }
 
+            /// <summary>
+            /// The response record metadata.
+            /// </summary>
+            [DataMember(Name = "metadata")]
+#if NETCOREAPP_3_1
+            [System.Text.Json.Serialization.JsonPropertyName("metadata")]
+#endif
+            public FirehoseResponseRecordMetadata Metadata { get; set; }
+
+
             /// <summary>
             /// Base64 encodes the data and sets the Base64EncodedData property.
             /// </summary>
@@ -101,5 +111,22 @@ public void EncodeData(string data)
                 this.Base64EncodedData = Convert.ToBase64String(Encoding.UTF8.GetBytes(data));
             }
         }
+
+        /// <summary>
+        /// The response record metadata after processing KinesisFirehoseEvent.Records
+        /// </summary>
+        [DataContract]
+        public class FirehoseResponseRecordMetadata
+        {
+            /// <summary>
+            /// Key Value pairs used for Dynamic Partitioning
+            /// https://docs.aws.amazon.com/firehose/latest/dev/dynamic-partitioning.html
+            /// </summary>
+            [DataMember(Name = "partitionKeys")]
+#if NETCOREAPP_3_1
+            [System.Text.Json.Serialization.JsonPropertyName("partitionKeys")]
+#endif
+            public Dictionary<string, string> PartitionKeys { get; set; }
+        }
     }
 }


Test patch:
diff --git a/Libraries/test/EventsTests.Shared/EventTests.cs b/Libraries/test/EventsTests.Shared/EventTests.cs
index 8027c78ac..36c4481bd 100644
--- a/Libraries/test/EventsTests.Shared/EventTests.cs
+++ b/Libraries/test/EventsTests.Shared/EventTests.cs
@@ -1559,7 +1559,8 @@ public void KinesisFirehoseResponseTest(Type serializerType)
                 Assert.Equal("49572672223665514422805246926656954630972486059535892482", kinesisResponse.Records[0].RecordId);
                 Assert.Equal(KinesisFirehoseResponse.TRANSFORMED_STATE_OK, kinesisResponse.Records[0].Result);
                 Assert.Equal("SEVMTE8gV09STEQ=", kinesisResponse.Records[0].Base64EncodedData);
-
+                Assert.Equal("iamValue1", kinesisResponse.Records[0].Metadata.PartitionKeys["iamKey1"]);
+                Assert.Equal("iamValue2", kinesisResponse.Records[0].Metadata.PartitionKeys["iamKey2"]);
 
 
                 MemoryStream ms = new MemoryStream();
diff --git a/Libraries/test/EventsTests.Shared/kinesis-firehose-response.json b/Libraries/test/EventsTests.Shared/kinesis-firehose-response.json
index bf25f21d1..8fb0c21db 100644
--- a/Libraries/test/EventsTests.Shared/kinesis-firehose-response.json
+++ b/Libraries/test/EventsTests.Shared/kinesis-firehose-response.json
@@ -3,7 +3,13 @@
     {
       "recordId": "49572672223665514422805246926656954630972486059535892482",
       "result": "Ok",
-      "data": "SEVMTE8gV09STEQ="
+      "data": "SEVMTE8gV09STEQ=",
+      "metadata": {
+        "partitionKeys": {
+          "iamKey1": "iamValue1",
+          "iamKey2": "iamValue2"
+        }
+      }
     }
   ]
-}
\ No newline at end of file
+}