public ReplicationRule withFilter(ReplicationFilter filter) {
        setFilter(filter);
        return this;
    }
Fluent method to set the {@link ReplicationFilter} that is used to identify objects
that a CRR Rule applies to. A rule cannot have both {@link ReplicationFilter}
and the deprecated {@link #prefix}.

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