public NotificationConfiguration withFilter(Filter filter) {
        setFilter(filter);
        return this;
    }
Sets the filter criteria for this {@link NotificationConfiguration} and returns this object
for method chaining.

@param filter
           New {@link Filter}
@return This object for method chaining
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/NotificationConfiguration.java