-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
feature-requestA feature should be added or improved.A feature should be added or improved.help wantedWe are asking the community to submit a PR to resolve this issue.We are asking the community to submit a PR to resolve this issue.
Description
The class S3EventNotificationRecord contains a property called eventName of the type String. In my application, I need to have different logic depending on the type of event. I am going to have to hard code the different values this event can have, but I could use the enum in S3Event for this. Something like the following:
public static class S3EventNotificationRecord {
private final String awsRegion;
private final String eventName;
private final S3Event eventType;
Another solution would be to have a fromString method in the S3Event, so at least I could convert the incoming value in the record into the enum. However, the incoming values don't match exactly the values in the enum: ObjectRestore:Completed vs s3:ObjectRestore:Completed so the first solution would be preferred. This would be something like:
S3Event s3Event = S3Event.fromString("s3:ObjectRestore:Completed");
Metadata
Metadata
Assignees
Labels
feature-requestA feature should be added or improved.A feature should be added or improved.help wantedWe are asking the community to submit a PR to resolve this issue.We are asking the community to submit a PR to resolve this issue.