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

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class BrokerEncryptionOptions {
    /**
     * @return Amazon Resource Name (ARN) of Key Management Service (KMS) Customer Master Key (CMK) to use for encryption at rest. Requires setting `use_aws_owned_key` to `false`. To perform drift detection when AWS-managed CMKs or customer-managed CMKs are in use, this value must be configured.
     * 
     */
    private @Nullable String kmsKeyId;
    /**
     * @return Whether to enable an AWS-owned KMS CMK that is not in your account. Defaults to `true`. Setting to `false` without configuring `kms_key_id` will create an AWS-managed CMK aliased to `aws/mq` in your account.
     * 
     */
    private @Nullable Boolean useAwsOwnedKey;

    private BrokerEncryptionOptions() {}
    /**
     * @return Amazon Resource Name (ARN) of Key Management Service (KMS) Customer Master Key (CMK) to use for encryption at rest. Requires setting `use_aws_owned_key` to `false`. To perform drift detection when AWS-managed CMKs or customer-managed CMKs are in use, this value must be configured.
     * 
     */
    public Optional<String> kmsKeyId() {
        return Optional.ofNullable(this.kmsKeyId);
    }
    /**
     * @return Whether to enable an AWS-owned KMS CMK that is not in your account. Defaults to `true`. Setting to `false` without configuring `kms_key_id` will create an AWS-managed CMK aliased to `aws/mq` in your account.
     * 
     */
    public Optional<Boolean> useAwsOwnedKey() {
        return Optional.ofNullable(this.useAwsOwnedKey);
    }

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

    public static Builder builder(BrokerEncryptionOptions defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String kmsKeyId;
        private @Nullable Boolean useAwsOwnedKey;
        public Builder() {}
        public Builder(BrokerEncryptionOptions defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.kmsKeyId = defaults.kmsKeyId;
    	      this.useAwsOwnedKey = defaults.useAwsOwnedKey;
        }

        @CustomType.Setter
        public Builder kmsKeyId(@Nullable String kmsKeyId) {
            this.kmsKeyId = kmsKeyId;
            return this;
        }
        @CustomType.Setter
        public Builder useAwsOwnedKey(@Nullable Boolean useAwsOwnedKey) {
            this.useAwsOwnedKey = useAwsOwnedKey;
            return this;
        }
        public BrokerEncryptionOptions build() {
            final var o = new BrokerEncryptionOptions();
            o.kmsKeyId = kmsKeyId;
            o.useAwsOwnedKey = useAwsOwnedKey;
            return o;
        }
    }
}
