// *** 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.BucketObjectLockConfigurationV2RuleArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final BucketObjectLockConfigurationV2State Empty = new BucketObjectLockConfigurationV2State();

    /**
     * Name of the bucket.
     * 
     */
    @Import(name="bucket")
    private @Nullable Output<String> bucket;

    /**
     * @return Name of the bucket.
     * 
     */
    public Optional<Output<String>> bucket() {
        return Optional.ofNullable(this.bucket);
    }

    /**
     * Account ID of the expected bucket owner.
     * 
     */
    @Import(name="expectedBucketOwner")
    private @Nullable Output<String> expectedBucketOwner;

    /**
     * @return Account ID of the expected bucket owner.
     * 
     */
    public Optional<Output<String>> expectedBucketOwner() {
        return Optional.ofNullable(this.expectedBucketOwner);
    }

    /**
     * Indicates whether this bucket has an Object Lock configuration enabled. Defaults to `Enabled`. Valid values: `Enabled`.
     * 
     */
    @Import(name="objectLockEnabled")
    private @Nullable Output<String> objectLockEnabled;

    /**
     * @return Indicates whether this bucket has an Object Lock configuration enabled. Defaults to `Enabled`. Valid values: `Enabled`.
     * 
     */
    public Optional<Output<String>> objectLockEnabled() {
        return Optional.ofNullable(this.objectLockEnabled);
    }

    /**
     * Configuration block for specifying the Object Lock rule for the specified object. See below.
     * 
     */
    @Import(name="rule")
    private @Nullable Output<BucketObjectLockConfigurationV2RuleArgs> rule;

    /**
     * @return Configuration block for specifying the Object Lock rule for the specified object. See below.
     * 
     */
    public Optional<Output<BucketObjectLockConfigurationV2RuleArgs>> rule() {
        return Optional.ofNullable(this.rule);
    }

    /**
     * Token to allow Object Lock to be enabled for an existing bucket. You must contact AWS support for the bucket&#39;s &#34;Object Lock token&#34;.
     * The token is generated in the back-end when [versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html) is enabled on a bucket. For more details on versioning, see the `aws.s3.BucketVersioningV2` resource.
     * 
     */
    @Import(name="token")
    private @Nullable Output<String> token;

    /**
     * @return Token to allow Object Lock to be enabled for an existing bucket. You must contact AWS support for the bucket&#39;s &#34;Object Lock token&#34;.
     * The token is generated in the back-end when [versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html) is enabled on a bucket. For more details on versioning, see the `aws.s3.BucketVersioningV2` resource.
     * 
     */
    public Optional<Output<String>> token() {
        return Optional.ofNullable(this.token);
    }

    private BucketObjectLockConfigurationV2State() {}

    private BucketObjectLockConfigurationV2State(BucketObjectLockConfigurationV2State $) {
        this.bucket = $.bucket;
        this.expectedBucketOwner = $.expectedBucketOwner;
        this.objectLockEnabled = $.objectLockEnabled;
        this.rule = $.rule;
        this.token = $.token;
    }

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

    public static final class Builder {
        private BucketObjectLockConfigurationV2State $;

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

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

        /**
         * @param bucket Name of the bucket.
         * 
         * @return builder
         * 
         */
        public Builder bucket(@Nullable Output<String> bucket) {
            $.bucket = bucket;
            return this;
        }

        /**
         * @param bucket Name of the bucket.
         * 
         * @return builder
         * 
         */
        public Builder bucket(String bucket) {
            return bucket(Output.of(bucket));
        }

        /**
         * @param expectedBucketOwner Account ID of the expected bucket owner.
         * 
         * @return builder
         * 
         */
        public Builder expectedBucketOwner(@Nullable Output<String> expectedBucketOwner) {
            $.expectedBucketOwner = expectedBucketOwner;
            return this;
        }

        /**
         * @param expectedBucketOwner Account ID of the expected bucket owner.
         * 
         * @return builder
         * 
         */
        public Builder expectedBucketOwner(String expectedBucketOwner) {
            return expectedBucketOwner(Output.of(expectedBucketOwner));
        }

        /**
         * @param objectLockEnabled Indicates whether this bucket has an Object Lock configuration enabled. Defaults to `Enabled`. Valid values: `Enabled`.
         * 
         * @return builder
         * 
         */
        public Builder objectLockEnabled(@Nullable Output<String> objectLockEnabled) {
            $.objectLockEnabled = objectLockEnabled;
            return this;
        }

        /**
         * @param objectLockEnabled Indicates whether this bucket has an Object Lock configuration enabled. Defaults to `Enabled`. Valid values: `Enabled`.
         * 
         * @return builder
         * 
         */
        public Builder objectLockEnabled(String objectLockEnabled) {
            return objectLockEnabled(Output.of(objectLockEnabled));
        }

        /**
         * @param rule Configuration block for specifying the Object Lock rule for the specified object. See below.
         * 
         * @return builder
         * 
         */
        public Builder rule(@Nullable Output<BucketObjectLockConfigurationV2RuleArgs> rule) {
            $.rule = rule;
            return this;
        }

        /**
         * @param rule Configuration block for specifying the Object Lock rule for the specified object. See below.
         * 
         * @return builder
         * 
         */
        public Builder rule(BucketObjectLockConfigurationV2RuleArgs rule) {
            return rule(Output.of(rule));
        }

        /**
         * @param token Token to allow Object Lock to be enabled for an existing bucket. You must contact AWS support for the bucket&#39;s &#34;Object Lock token&#34;.
         * The token is generated in the back-end when [versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html) is enabled on a bucket. For more details on versioning, see the `aws.s3.BucketVersioningV2` resource.
         * 
         * @return builder
         * 
         */
        public Builder token(@Nullable Output<String> token) {
            $.token = token;
            return this;
        }

        /**
         * @param token Token to allow Object Lock to be enabled for an existing bucket. You must contact AWS support for the bucket&#39;s &#34;Object Lock token&#34;.
         * The token is generated in the back-end when [versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html) is enabled on a bucket. For more details on versioning, see the `aws.s3.BucketVersioningV2` resource.
         * 
         * @return builder
         * 
         */
        public Builder token(String token) {
            return token(Output.of(token));
        }

        public BucketObjectLockConfigurationV2State build() {
            return $;
        }
    }

}
