// *** 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;

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


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

    public static final DataDiskAttachmentArgs Empty = new DataDiskAttachmentArgs();

    /**
     * Specifies the caching requirements for this Data Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
     * 
     */
    @Import(name="caching", required=true)
    private Output<String> caching;

    /**
     * @return Specifies the caching requirements for this Data Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
     * 
     */
    public Output<String> caching() {
        return this.caching;
    }

    /**
     * The Create Option of the Data Disk, such as `Empty` or `Attach`. Defaults to `Attach`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="createOption")
    private @Nullable Output<String> createOption;

    /**
     * @return The Create Option of the Data Disk, such as `Empty` or `Attach`. Defaults to `Attach`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> createOption() {
        return Optional.ofNullable(this.createOption);
    }

    /**
     * The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="lun", required=true)
    private Output<Integer> lun;

    /**
     * @return The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    public Output<Integer> lun() {
        return this.lun;
    }

    /**
     * The ID of an existing Managed Disk which should be attached. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="managedDiskId", required=true)
    private Output<String> managedDiskId;

    /**
     * @return The ID of an existing Managed Disk which should be attached. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> managedDiskId() {
        return this.managedDiskId;
    }

    /**
     * The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="virtualMachineId", required=true)
    private Output<String> virtualMachineId;

    /**
     * @return The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> virtualMachineId() {
        return this.virtualMachineId;
    }

    /**
     * Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
     * 
     */
    @Import(name="writeAcceleratorEnabled")
    private @Nullable Output<Boolean> writeAcceleratorEnabled;

    /**
     * @return Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> writeAcceleratorEnabled() {
        return Optional.ofNullable(this.writeAcceleratorEnabled);
    }

    private DataDiskAttachmentArgs() {}

    private DataDiskAttachmentArgs(DataDiskAttachmentArgs $) {
        this.caching = $.caching;
        this.createOption = $.createOption;
        this.lun = $.lun;
        this.managedDiskId = $.managedDiskId;
        this.virtualMachineId = $.virtualMachineId;
        this.writeAcceleratorEnabled = $.writeAcceleratorEnabled;
    }

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

    public static final class Builder {
        private DataDiskAttachmentArgs $;

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

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

        /**
         * @param caching Specifies the caching requirements for this Data Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
         * 
         * @return builder
         * 
         */
        public Builder caching(Output<String> caching) {
            $.caching = caching;
            return this;
        }

        /**
         * @param caching Specifies the caching requirements for this Data Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
         * 
         * @return builder
         * 
         */
        public Builder caching(String caching) {
            return caching(Output.of(caching));
        }

        /**
         * @param createOption The Create Option of the Data Disk, such as `Empty` or `Attach`. Defaults to `Attach`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder createOption(@Nullable Output<String> createOption) {
            $.createOption = createOption;
            return this;
        }

        /**
         * @param createOption The Create Option of the Data Disk, such as `Empty` or `Attach`. Defaults to `Attach`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder createOption(String createOption) {
            return createOption(Output.of(createOption));
        }

        /**
         * @param lun The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder lun(Output<Integer> lun) {
            $.lun = lun;
            return this;
        }

        /**
         * @param lun The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder lun(Integer lun) {
            return lun(Output.of(lun));
        }

        /**
         * @param managedDiskId The ID of an existing Managed Disk which should be attached. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedDiskId(Output<String> managedDiskId) {
            $.managedDiskId = managedDiskId;
            return this;
        }

        /**
         * @param managedDiskId The ID of an existing Managed Disk which should be attached. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedDiskId(String managedDiskId) {
            return managedDiskId(Output.of(managedDiskId));
        }

        /**
         * @param virtualMachineId The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineId(Output<String> virtualMachineId) {
            $.virtualMachineId = virtualMachineId;
            return this;
        }

        /**
         * @param virtualMachineId The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineId(String virtualMachineId) {
            return virtualMachineId(Output.of(virtualMachineId));
        }

        /**
         * @param writeAcceleratorEnabled Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder writeAcceleratorEnabled(@Nullable Output<Boolean> writeAcceleratorEnabled) {
            $.writeAcceleratorEnabled = writeAcceleratorEnabled;
            return this;
        }

        /**
         * @param writeAcceleratorEnabled Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder writeAcceleratorEnabled(Boolean writeAcceleratorEnabled) {
            return writeAcceleratorEnabled(Output.of(writeAcceleratorEnabled));
        }

        public DataDiskAttachmentArgs build() {
            $.caching = Objects.requireNonNull($.caching, "expected parameter 'caching' to be non-null");
            $.lun = Objects.requireNonNull($.lun, "expected parameter 'lun' to be non-null");
            $.managedDiskId = Objects.requireNonNull($.managedDiskId, "expected parameter 'managedDiskId' to be non-null");
            $.virtualMachineId = Objects.requireNonNull($.virtualMachineId, "expected parameter 'virtualMachineId' to be non-null");
            return $;
        }
    }

}
