feat: Add POCOs for S3 object events
This commit adds POCOs to model S3 object events routed via EventBridge.
closes #1072
@rpf3 It would be nice to add some test cases as well. Please refer existing ones as a reference.
@rpf3 Also refer https://docs.aws.amazon.com/AmazonS3/latest/userguide//ev-events.html, detail could have additional details based on operation. Few examples:
-
deletion-typefor delete operation -
restore-expiry-timeandsource-storage-classfor object restore completed.
S3ObjectEventDetails class perhaps needs to be modeled accordingly, perhaps might want to create subclasses for each scenario.
@ashishdhingra I've pushed some new models as you requested. Is this more in line with what you were thinking?
@ashishdhingra I've pushed some new models as you requested. Is this more in line with what you were thinking?
@rpf3 Thanks. Could you also add some unit tests as well as requested in https://github.com/aws/aws-lambda-dotnet/pull/1073#issuecomment-1050236089.
I manually added unit tests, change size to be a long from an int and added DataContract attributes to fix serialization with Newtonsoft. I'll work on getting this PR released soon.
This PR has been released as part of version 4.1.0 of Amazon.Lambda.CloudWatchEvents. Thanks for the PR!