@Deprecated
    public void setPrefix(String prefix) {
        if (prefix == null) {
            throw new IllegalArgumentException(
                    "Prefix cannot be null for a replication rule");
        }
        if (filter != null) {
            throw new IllegalArgumentException(
                    "You cannot use both prefix and filter at the same time in a replication rule");
        }
        this.prefix = prefix;
    }
Sets the Amazon S3 Object prefix for the replication rule.

@throws IllegalArgumentException
            if the prefix is null.
@deprecated Use {@link ReplicationFilter}.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ReplicationRule.java