// *** 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.BucketObjectLockConfigurationRuleArgs;
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 BucketObjectLockConfigurationArgs extends com.pulumi.resources.ResourceArgs {

    public static final BucketObjectLockConfigurationArgs Empty = new BucketObjectLockConfigurationArgs();

    /**
     * Indicates whether this bucket has an Object Lock configuration enabled. Valid value is `Enabled`.
     * 
     */
    @Import(name="objectLockEnabled", required=true)
    private Output<String> objectLockEnabled;

    /**
     * @return Indicates whether this bucket has an Object Lock configuration enabled. Valid value is `Enabled`.
     * 
     */
    public Output<String> objectLockEnabled() {
        return this.objectLockEnabled;
    }

    /**
     * The Object Lock rule in place for this bucket.
     * 
     */
    @Import(name="rule")
    private @Nullable Output<BucketObjectLockConfigurationRuleArgs> rule;

    /**
     * @return The Object Lock rule in place for this bucket.
     * 
     */
    public Optional<Output<BucketObjectLockConfigurationRuleArgs>> rule() {
        return Optional.ofNullable(this.rule);
    }

    private BucketObjectLockConfigurationArgs() {}

    private BucketObjectLockConfigurationArgs(BucketObjectLockConfigurationArgs $) {
        this.objectLockEnabled = $.objectLockEnabled;
        this.rule = $.rule;
    }

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

    public static final class Builder {
        private BucketObjectLockConfigurationArgs $;

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

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

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

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

        /**
         * @param rule The Object Lock rule in place for this bucket.
         * 
         * @return builder
         * 
         */
        public Builder rule(@Nullable Output<BucketObjectLockConfigurationRuleArgs> rule) {
            $.rule = rule;
            return this;
        }

        /**
         * @param rule The Object Lock rule in place for this bucket.
         * 
         * @return builder
         * 
         */
        public Builder rule(BucketObjectLockConfigurationRuleArgs rule) {
            return rule(Output.of(rule));
        }

        public BucketObjectLockConfigurationArgs build() {
            $.objectLockEnabled = Objects.requireNonNull($.objectLockEnabled, "expected parameter 'objectLockEnabled' to be non-null");
            return $;
        }
    }

}
