// *** 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.synapse.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 WorkspaceKeyState extends com.pulumi.resources.ResourceArgs {

    public static final WorkspaceKeyState Empty = new WorkspaceKeyState();

    /**
     * Specifies if the workspace should be encrypted with this key.
     * 
     * &gt; **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
     * 
     */
    @Import(name="active")
    private @Nullable Output<Boolean> active;

    /**
     * @return Specifies if the workspace should be encrypted with this key.
     * 
     * &gt; **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
     * 
     */
    public Optional<Output<Boolean>> active() {
        return Optional.ofNullable(this.active);
    }

    /**
     * Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
     * 
     */
    @Import(name="customerManagedKeyName")
    private @Nullable Output<String> customerManagedKeyName;

    /**
     * @return Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
     * 
     */
    public Optional<Output<String>> customerManagedKeyName() {
        return Optional.ofNullable(this.customerManagedKeyName);
    }

    /**
     * The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
     * 
     */
    @Import(name="customerManagedKeyVersionlessId")
    private @Nullable Output<String> customerManagedKeyVersionlessId;

    /**
     * @return The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
     * 
     */
    public Optional<Output<String>> customerManagedKeyVersionlessId() {
        return Optional.ofNullable(this.customerManagedKeyVersionlessId);
    }

    /**
     * The ID of the Synapse Workspace where the encryption key should be configured.
     * 
     */
    @Import(name="synapseWorkspaceId")
    private @Nullable Output<String> synapseWorkspaceId;

    /**
     * @return The ID of the Synapse Workspace where the encryption key should be configured.
     * 
     */
    public Optional<Output<String>> synapseWorkspaceId() {
        return Optional.ofNullable(this.synapseWorkspaceId);
    }

    private WorkspaceKeyState() {}

    private WorkspaceKeyState(WorkspaceKeyState $) {
        this.active = $.active;
        this.customerManagedKeyName = $.customerManagedKeyName;
        this.customerManagedKeyVersionlessId = $.customerManagedKeyVersionlessId;
        this.synapseWorkspaceId = $.synapseWorkspaceId;
    }

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

    public static final class Builder {
        private WorkspaceKeyState $;

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

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

        /**
         * @param active Specifies if the workspace should be encrypted with this key.
         * 
         * &gt; **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
         * 
         * @return builder
         * 
         */
        public Builder active(@Nullable Output<Boolean> active) {
            $.active = active;
            return this;
        }

        /**
         * @param active Specifies if the workspace should be encrypted with this key.
         * 
         * &gt; **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
         * 
         * @return builder
         * 
         */
        public Builder active(Boolean active) {
            return active(Output.of(active));
        }

        /**
         * @param customerManagedKeyName Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKeyName(@Nullable Output<String> customerManagedKeyName) {
            $.customerManagedKeyName = customerManagedKeyName;
            return this;
        }

        /**
         * @param customerManagedKeyName Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKeyName(String customerManagedKeyName) {
            return customerManagedKeyName(Output.of(customerManagedKeyName));
        }

        /**
         * @param customerManagedKeyVersionlessId The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKeyVersionlessId(@Nullable Output<String> customerManagedKeyVersionlessId) {
            $.customerManagedKeyVersionlessId = customerManagedKeyVersionlessId;
            return this;
        }

        /**
         * @param customerManagedKeyVersionlessId The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKeyVersionlessId(String customerManagedKeyVersionlessId) {
            return customerManagedKeyVersionlessId(Output.of(customerManagedKeyVersionlessId));
        }

        /**
         * @param synapseWorkspaceId The ID of the Synapse Workspace where the encryption key should be configured.
         * 
         * @return builder
         * 
         */
        public Builder synapseWorkspaceId(@Nullable Output<String> synapseWorkspaceId) {
            $.synapseWorkspaceId = synapseWorkspaceId;
            return this;
        }

        /**
         * @param synapseWorkspaceId The ID of the Synapse Workspace where the encryption key should be configured.
         * 
         * @return builder
         * 
         */
        public Builder synapseWorkspaceId(String synapseWorkspaceId) {
            return synapseWorkspaceId(Output.of(synapseWorkspaceId));
        }

        public WorkspaceKeyState build() {
            return $;
        }
    }

}
