// *** 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.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class BucketLifecycleConfigurationV2RuleFilterAnd {
    /**
     * @return Minimum object size to which the rule applies. Value must be at least `0` if specified.
     * 
     */
    private @Nullable Integer objectSizeGreaterThan;
    /**
     * @return Maximum object size to which the rule applies. Value must be at least `1` if specified.
     * 
     */
    private @Nullable Integer objectSizeLessThan;
    /**
     * @return Prefix identifying one or more objects to which the rule applies.
     * 
     */
    private @Nullable String prefix;
    /**
     * @return Key-value map of resource tags. All of these tags must exist in the object&#39;s tag set in order for the rule to apply.
     * 
     */
    private @Nullable Map<String,String> tags;

    private BucketLifecycleConfigurationV2RuleFilterAnd() {}
    /**
     * @return Minimum object size to which the rule applies. Value must be at least `0` if specified.
     * 
     */
    public Optional<Integer> objectSizeGreaterThan() {
        return Optional.ofNullable(this.objectSizeGreaterThan);
    }
    /**
     * @return Maximum object size to which the rule applies. Value must be at least `1` if specified.
     * 
     */
    public Optional<Integer> objectSizeLessThan() {
        return Optional.ofNullable(this.objectSizeLessThan);
    }
    /**
     * @return Prefix identifying one or more objects to which the rule applies.
     * 
     */
    public Optional<String> prefix() {
        return Optional.ofNullable(this.prefix);
    }
    /**
     * @return Key-value map of resource tags. All of these tags must exist in the object&#39;s tag set in order for the rule to apply.
     * 
     */
    public Map<String,String> tags() {
        return this.tags == null ? Map.of() : this.tags;
    }

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

    public static Builder builder(BucketLifecycleConfigurationV2RuleFilterAnd defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Integer objectSizeGreaterThan;
        private @Nullable Integer objectSizeLessThan;
        private @Nullable String prefix;
        private @Nullable Map<String,String> tags;
        public Builder() {}
        public Builder(BucketLifecycleConfigurationV2RuleFilterAnd defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.objectSizeGreaterThan = defaults.objectSizeGreaterThan;
    	      this.objectSizeLessThan = defaults.objectSizeLessThan;
    	      this.prefix = defaults.prefix;
    	      this.tags = defaults.tags;
        }

        @CustomType.Setter
        public Builder objectSizeGreaterThan(@Nullable Integer objectSizeGreaterThan) {
            this.objectSizeGreaterThan = objectSizeGreaterThan;
            return this;
        }
        @CustomType.Setter
        public Builder objectSizeLessThan(@Nullable Integer objectSizeLessThan) {
            this.objectSizeLessThan = objectSizeLessThan;
            return this;
        }
        @CustomType.Setter
        public Builder prefix(@Nullable String prefix) {
            this.prefix = prefix;
            return this;
        }
        @CustomType.Setter
        public Builder tags(@Nullable Map<String,String> tags) {
            this.tags = tags;
            return this;
        }
        public BucketLifecycleConfigurationV2RuleFilterAnd build() {
            final var o = new BucketLifecycleConfigurationV2RuleFilterAnd();
            o.objectSizeGreaterThan = objectSizeGreaterThan;
            o.objectSizeLessThan = objectSizeLessThan;
            o.prefix = prefix;
            o.tags = tags;
            return o;
        }
    }
}
