// *** 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.inputs;

import com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class BucketLifecycleConfigurationV2State extends com.pulumi.resources.ResourceArgs {

    public static final BucketLifecycleConfigurationV2State Empty = new BucketLifecycleConfigurationV2State();

    /**
     * Name of the source S3 bucket you want Amazon S3 to monitor.
     * 
     */
    @Import(name="bucket")
    private @Nullable Output<String> bucket;

    /**
     * @return Name of the source S3 bucket you want Amazon S3 to monitor.
     * 
     */
    public Optional<Output<String>> bucket() {
        return Optional.ofNullable(this.bucket);
    }

    /**
     * Account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
     * 
     */
    @Import(name="expectedBucketOwner")
    private @Nullable Output<String> expectedBucketOwner;

    /**
     * @return Account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
     * 
     */
    public Optional<Output<String>> expectedBucketOwner() {
        return Optional.ofNullable(this.expectedBucketOwner);
    }

    /**
     * List of configuration blocks describing the rules managing the replication. See below.
     * 
     */
    @Import(name="rules")
    private @Nullable Output<List<BucketLifecycleConfigurationV2RuleArgs>> rules;

    /**
     * @return List of configuration blocks describing the rules managing the replication. See below.
     * 
     */
    public Optional<Output<List<BucketLifecycleConfigurationV2RuleArgs>>> rules() {
        return Optional.ofNullable(this.rules);
    }

    private BucketLifecycleConfigurationV2State() {}

    private BucketLifecycleConfigurationV2State(BucketLifecycleConfigurationV2State $) {
        this.bucket = $.bucket;
        this.expectedBucketOwner = $.expectedBucketOwner;
        this.rules = $.rules;
    }

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

    public static final class Builder {
        private BucketLifecycleConfigurationV2State $;

        public Builder() {
            $ = new BucketLifecycleConfigurationV2State();
        }

        public Builder(BucketLifecycleConfigurationV2State defaults) {
            $ = new BucketLifecycleConfigurationV2State(Objects.requireNonNull(defaults));
        }

        /**
         * @param bucket Name of the source S3 bucket you want Amazon S3 to monitor.
         * 
         * @return builder
         * 
         */
        public Builder bucket(@Nullable Output<String> bucket) {
            $.bucket = bucket;
            return this;
        }

        /**
         * @param bucket Name of the source S3 bucket you want Amazon S3 to monitor.
         * 
         * @return builder
         * 
         */
        public Builder bucket(String bucket) {
            return bucket(Output.of(bucket));
        }

        /**
         * @param expectedBucketOwner Account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
         * 
         * @return builder
         * 
         */
        public Builder expectedBucketOwner(@Nullable Output<String> expectedBucketOwner) {
            $.expectedBucketOwner = expectedBucketOwner;
            return this;
        }

        /**
         * @param expectedBucketOwner Account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
         * 
         * @return builder
         * 
         */
        public Builder expectedBucketOwner(String expectedBucketOwner) {
            return expectedBucketOwner(Output.of(expectedBucketOwner));
        }

        /**
         * @param rules List of configuration blocks describing the rules managing the replication. See below.
         * 
         * @return builder
         * 
         */
        public Builder rules(@Nullable Output<List<BucketLifecycleConfigurationV2RuleArgs>> rules) {
            $.rules = rules;
            return this;
        }

        /**
         * @param rules List of configuration blocks describing the rules managing the replication. See below.
         * 
         * @return builder
         * 
         */
        public Builder rules(List<BucketLifecycleConfigurationV2RuleArgs> rules) {
            return rules(Output.of(rules));
        }

        /**
         * @param rules List of configuration blocks describing the rules managing the replication. See below.
         * 
         * @return builder
         * 
         */
        public Builder rules(BucketLifecycleConfigurationV2RuleArgs... rules) {
            return rules(List.of(rules));
        }

        public BucketLifecycleConfigurationV2State build() {
            return $;
        }
    }

}
