// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.s3.outputs;

import com.pulumi.aws.s3.outputs.BucketReplicationConfigRuleFilterAnd;
import com.pulumi.aws.s3.outputs.BucketReplicationConfigRuleFilterTag;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class BucketReplicationConfigRuleFilter {
    /**
     * @return Configuration block for specifying rule filters. This element is required only if you specify more than one filter. See and below for more details.
     * 
     */
    private @Nullable BucketReplicationConfigRuleFilterAnd and;
    /**
     * @return Object key name prefix that identifies subset of objects to which the rule applies. Must be less than or equal to 1024 characters in length.
     * 
     */
    private @Nullable String prefix;
    /**
     * @return Configuration block for specifying a tag key and value. See below.
     * 
     */
    private @Nullable BucketReplicationConfigRuleFilterTag tag;

    private BucketReplicationConfigRuleFilter() {}
    /**
     * @return Configuration block for specifying rule filters. This element is required only if you specify more than one filter. See and below for more details.
     * 
     */
    public Optional<BucketReplicationConfigRuleFilterAnd> and() {
        return Optional.ofNullable(this.and);
    }
    /**
     * @return Object key name prefix that identifies subset of objects to which the rule applies. Must be less than or equal to 1024 characters in length.
     * 
     */
    public Optional<String> prefix() {
        return Optional.ofNullable(this.prefix);
    }
    /**
     * @return Configuration block for specifying a tag key and value. See below.
     * 
     */
    public Optional<BucketReplicationConfigRuleFilterTag> tag() {
        return Optional.ofNullable(this.tag);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(BucketReplicationConfigRuleFilter defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable BucketReplicationConfigRuleFilterAnd and;
        private @Nullable String prefix;
        private @Nullable BucketReplicationConfigRuleFilterTag tag;
        public Builder() {}
        public Builder(BucketReplicationConfigRuleFilter defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.and = defaults.and;
    	      this.prefix = defaults.prefix;
    	      this.tag = defaults.tag;
        }

        @CustomType.Setter
        public Builder and(@Nullable BucketReplicationConfigRuleFilterAnd and) {
            this.and = and;
            return this;
        }
        @CustomType.Setter
        public Builder prefix(@Nullable String prefix) {
            this.prefix = prefix;
            return this;
        }
        @CustomType.Setter
        public Builder tag(@Nullable BucketReplicationConfigRuleFilterTag tag) {
            this.tag = tag;
            return this;
        }
        public BucketReplicationConfigRuleFilter build() {
            final var o = new BucketReplicationConfigRuleFilter();
            o.and = and;
            o.prefix = prefix;
            o.tag = tag;
            return o;
        }
    }
}
