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

import com.pulumi.azure.compute.outputs.ManagedDiskEncryptionSettingsDiskEncryptionKey;
import com.pulumi.azure.compute.outputs.ManagedDiskEncryptionSettingsKeyEncryptionKey;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ManagedDiskEncryptionSettings {
    /**
     * @return A `disk_encryption_key` block as defined above.
     * 
     */
    private @Nullable ManagedDiskEncryptionSettingsDiskEncryptionKey diskEncryptionKey;
    /**
     * @deprecated
     * Deprecated, Azure Disk Encryption is now configured directly by `disk_encryption_key` and `key_encryption_key`. To disable Azure Disk Encryption, please remove `encryption_settings` block. To enabled, specify a `encryption_settings` block`
     * 
     */
    @Deprecated /* Deprecated, Azure Disk Encryption is now configured directly by `disk_encryption_key` and `key_encryption_key`. To disable Azure Disk Encryption, please remove `encryption_settings` block. To enabled, specify a `encryption_settings` block` */
    private @Nullable Boolean enabled;
    /**
     * @return A `key_encryption_key` block as defined below.
     * 
     */
    private @Nullable ManagedDiskEncryptionSettingsKeyEncryptionKey keyEncryptionKey;

    private ManagedDiskEncryptionSettings() {}
    /**
     * @return A `disk_encryption_key` block as defined above.
     * 
     */
    public Optional<ManagedDiskEncryptionSettingsDiskEncryptionKey> diskEncryptionKey() {
        return Optional.ofNullable(this.diskEncryptionKey);
    }
    /**
     * @deprecated
     * Deprecated, Azure Disk Encryption is now configured directly by `disk_encryption_key` and `key_encryption_key`. To disable Azure Disk Encryption, please remove `encryption_settings` block. To enabled, specify a `encryption_settings` block`
     * 
     */
    @Deprecated /* Deprecated, Azure Disk Encryption is now configured directly by `disk_encryption_key` and `key_encryption_key`. To disable Azure Disk Encryption, please remove `encryption_settings` block. To enabled, specify a `encryption_settings` block` */
    public Optional<Boolean> enabled() {
        return Optional.ofNullable(this.enabled);
    }
    /**
     * @return A `key_encryption_key` block as defined below.
     * 
     */
    public Optional<ManagedDiskEncryptionSettingsKeyEncryptionKey> keyEncryptionKey() {
        return Optional.ofNullable(this.keyEncryptionKey);
    }

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

    public static Builder builder(ManagedDiskEncryptionSettings defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable ManagedDiskEncryptionSettingsDiskEncryptionKey diskEncryptionKey;
        private @Nullable Boolean enabled;
        private @Nullable ManagedDiskEncryptionSettingsKeyEncryptionKey keyEncryptionKey;
        public Builder() {}
        public Builder(ManagedDiskEncryptionSettings defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.diskEncryptionKey = defaults.diskEncryptionKey;
    	      this.enabled = defaults.enabled;
    	      this.keyEncryptionKey = defaults.keyEncryptionKey;
        }

        @CustomType.Setter
        public Builder diskEncryptionKey(@Nullable ManagedDiskEncryptionSettingsDiskEncryptionKey diskEncryptionKey) {
            this.diskEncryptionKey = diskEncryptionKey;
            return this;
        }
        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {
            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder keyEncryptionKey(@Nullable ManagedDiskEncryptionSettingsKeyEncryptionKey keyEncryptionKey) {
            this.keyEncryptionKey = keyEncryptionKey;
            return this;
        }
        public ManagedDiskEncryptionSettings build() {
            final var o = new ManagedDiskEncryptionSettings();
            o.diskEncryptionKey = diskEncryptionKey;
            o.enabled = enabled;
            o.keyEncryptionKey = keyEncryptionKey;
            return o;
        }
    }
}
