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

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


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

    public static final VaultEncryptionArgs Empty = new VaultEncryptionArgs();

    /**
     * Enabling/Disabling the Double Encryption state.
     * 
     */
    @Import(name="infrastructureEncryptionEnabled", required=true)
    private Output<Boolean> infrastructureEncryptionEnabled;

    /**
     * @return Enabling/Disabling the Double Encryption state.
     * 
     */
    public Output<Boolean> infrastructureEncryptionEnabled() {
        return this.infrastructureEncryptionEnabled;
    }

    /**
     * The Key Vault key id used to encrypt this vault. Key managed by Vault Managed Hardware Security Module is also supported.
     * 
     */
    @Import(name="keyId", required=true)
    private Output<String> keyId;

    /**
     * @return The Key Vault key id used to encrypt this vault. Key managed by Vault Managed Hardware Security Module is also supported.
     * 
     */
    public Output<String> keyId() {
        return this.keyId;
    }

    /**
     * Indicate that system assigned identity should be used or not. Defaults to `true`.
     * 
     * !&gt; **Note:** `use_system_assigned_identity` only be able to set to `false` for **new** vaults. Any vaults containing existing items registered or attempted to be registered to it are not supported. Details can be found in [the document](https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk?tabs=portal#before-you-start)
     * 
     * !&gt; **Note:** Once `infrastructure_encryption_enabled` has been set it&#39;s not possible to change it.
     * 
     */
    @Import(name="useSystemAssignedIdentity")
    private @Nullable Output<Boolean> useSystemAssignedIdentity;

    /**
     * @return Indicate that system assigned identity should be used or not. Defaults to `true`.
     * 
     * !&gt; **Note:** `use_system_assigned_identity` only be able to set to `false` for **new** vaults. Any vaults containing existing items registered or attempted to be registered to it are not supported. Details can be found in [the document](https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk?tabs=portal#before-you-start)
     * 
     * !&gt; **Note:** Once `infrastructure_encryption_enabled` has been set it&#39;s not possible to change it.
     * 
     */
    public Optional<Output<Boolean>> useSystemAssignedIdentity() {
        return Optional.ofNullable(this.useSystemAssignedIdentity);
    }

    /**
     * Specifies the user assigned identity ID to be used.
     * 
     */
    @Import(name="userAssignedIdentityId")
    private @Nullable Output<String> userAssignedIdentityId;

    /**
     * @return Specifies the user assigned identity ID to be used.
     * 
     */
    public Optional<Output<String>> userAssignedIdentityId() {
        return Optional.ofNullable(this.userAssignedIdentityId);
    }

    private VaultEncryptionArgs() {}

    private VaultEncryptionArgs(VaultEncryptionArgs $) {
        this.infrastructureEncryptionEnabled = $.infrastructureEncryptionEnabled;
        this.keyId = $.keyId;
        this.useSystemAssignedIdentity = $.useSystemAssignedIdentity;
        this.userAssignedIdentityId = $.userAssignedIdentityId;
    }

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

    public static final class Builder {
        private VaultEncryptionArgs $;

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

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

        /**
         * @param infrastructureEncryptionEnabled Enabling/Disabling the Double Encryption state.
         * 
         * @return builder
         * 
         */
        public Builder infrastructureEncryptionEnabled(Output<Boolean> infrastructureEncryptionEnabled) {
            $.infrastructureEncryptionEnabled = infrastructureEncryptionEnabled;
            return this;
        }

        /**
         * @param infrastructureEncryptionEnabled Enabling/Disabling the Double Encryption state.
         * 
         * @return builder
         * 
         */
        public Builder infrastructureEncryptionEnabled(Boolean infrastructureEncryptionEnabled) {
            return infrastructureEncryptionEnabled(Output.of(infrastructureEncryptionEnabled));
        }

        /**
         * @param keyId The Key Vault key id used to encrypt this vault. Key managed by Vault Managed Hardware Security Module is also supported.
         * 
         * @return builder
         * 
         */
        public Builder keyId(Output<String> keyId) {
            $.keyId = keyId;
            return this;
        }

        /**
         * @param keyId The Key Vault key id used to encrypt this vault. Key managed by Vault Managed Hardware Security Module is also supported.
         * 
         * @return builder
         * 
         */
        public Builder keyId(String keyId) {
            return keyId(Output.of(keyId));
        }

        /**
         * @param useSystemAssignedIdentity Indicate that system assigned identity should be used or not. Defaults to `true`.
         * 
         * !&gt; **Note:** `use_system_assigned_identity` only be able to set to `false` for **new** vaults. Any vaults containing existing items registered or attempted to be registered to it are not supported. Details can be found in [the document](https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk?tabs=portal#before-you-start)
         * 
         * !&gt; **Note:** Once `infrastructure_encryption_enabled` has been set it&#39;s not possible to change it.
         * 
         * @return builder
         * 
         */
        public Builder useSystemAssignedIdentity(@Nullable Output<Boolean> useSystemAssignedIdentity) {
            $.useSystemAssignedIdentity = useSystemAssignedIdentity;
            return this;
        }

        /**
         * @param useSystemAssignedIdentity Indicate that system assigned identity should be used or not. Defaults to `true`.
         * 
         * !&gt; **Note:** `use_system_assigned_identity` only be able to set to `false` for **new** vaults. Any vaults containing existing items registered or attempted to be registered to it are not supported. Details can be found in [the document](https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk?tabs=portal#before-you-start)
         * 
         * !&gt; **Note:** Once `infrastructure_encryption_enabled` has been set it&#39;s not possible to change it.
         * 
         * @return builder
         * 
         */
        public Builder useSystemAssignedIdentity(Boolean useSystemAssignedIdentity) {
            return useSystemAssignedIdentity(Output.of(useSystemAssignedIdentity));
        }

        /**
         * @param userAssignedIdentityId Specifies the user assigned identity ID to be used.
         * 
         * @return builder
         * 
         */
        public Builder userAssignedIdentityId(@Nullable Output<String> userAssignedIdentityId) {
            $.userAssignedIdentityId = userAssignedIdentityId;
            return this;
        }

        /**
         * @param userAssignedIdentityId Specifies the user assigned identity ID to be used.
         * 
         * @return builder
         * 
         */
        public Builder userAssignedIdentityId(String userAssignedIdentityId) {
            return userAssignedIdentityId(Output.of(userAssignedIdentityId));
        }

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

}
