All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.compute.outputs.DataDiskResponse Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** 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.azurenative.compute.outputs;

import com.pulumi.azurenative.compute.outputs.ManagedDiskParametersResponse;
import com.pulumi.azurenative.compute.outputs.VirtualHardDiskResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class DataDiskResponse {
    /**
     * @return Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**
     * 
     */
    private @Nullable String caching;
    /**
     * @return Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described.
     * 
     */
    private String createOption;
    /**
     * @return Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**.
     * 
     */
    private @Nullable String deleteOption;
    /**
     * @return Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.
     * 
     */
    private @Nullable String detachOption;
    /**
     * @return Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
     * 
     */
    private Double diskIOPSReadWrite;
    /**
     * @return Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
     * 
     */
    private Double diskMBpsReadWrite;
    /**
     * @return Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.
     * 
     */
    private @Nullable Integer diskSizeGB;
    /**
     * @return The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
     * 
     */
    private @Nullable VirtualHardDiskResponse image;
    /**
     * @return Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
     * 
     */
    private Integer lun;
    /**
     * @return The managed disk parameters.
     * 
     */
    private @Nullable ManagedDiskParametersResponse managedDisk;
    /**
     * @return The disk name.
     * 
     */
    private @Nullable String name;
    /**
     * @return Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
     * 
     */
    private @Nullable Boolean toBeDetached;
    /**
     * @return The virtual hard disk.
     * 
     */
    private @Nullable VirtualHardDiskResponse vhd;
    /**
     * @return Specifies whether writeAccelerator should be enabled or disabled on the disk.
     * 
     */
    private @Nullable Boolean writeAcceleratorEnabled;

    private DataDiskResponse() {}
    /**
     * @return Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**
     * 
     */
    public Optional caching() {
        return Optional.ofNullable(this.caching);
    }
    /**
     * @return Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described.
     * 
     */
    public String createOption() {
        return this.createOption;
    }
    /**
     * @return Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**.
     * 
     */
    public Optional deleteOption() {
        return Optional.ofNullable(this.deleteOption);
    }
    /**
     * @return Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.
     * 
     */
    public Optional detachOption() {
        return Optional.ofNullable(this.detachOption);
    }
    /**
     * @return Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
     * 
     */
    public Double diskIOPSReadWrite() {
        return this.diskIOPSReadWrite;
    }
    /**
     * @return Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
     * 
     */
    public Double diskMBpsReadWrite() {
        return this.diskMBpsReadWrite;
    }
    /**
     * @return Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.
     * 
     */
    public Optional diskSizeGB() {
        return Optional.ofNullable(this.diskSizeGB);
    }
    /**
     * @return The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
     * 
     */
    public Optional image() {
        return Optional.ofNullable(this.image);
    }
    /**
     * @return Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
     * 
     */
    public Integer lun() {
        return this.lun;
    }
    /**
     * @return The managed disk parameters.
     * 
     */
    public Optional managedDisk() {
        return Optional.ofNullable(this.managedDisk);
    }
    /**
     * @return The disk name.
     * 
     */
    public Optional name() {
        return Optional.ofNullable(this.name);
    }
    /**
     * @return Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
     * 
     */
    public Optional toBeDetached() {
        return Optional.ofNullable(this.toBeDetached);
    }
    /**
     * @return The virtual hard disk.
     * 
     */
    public Optional vhd() {
        return Optional.ofNullable(this.vhd);
    }
    /**
     * @return Specifies whether writeAccelerator should be enabled or disabled on the disk.
     * 
     */
    public Optional writeAcceleratorEnabled() {
        return Optional.ofNullable(this.writeAcceleratorEnabled);
    }

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

    public static Builder builder(DataDiskResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String caching;
        private String createOption;
        private @Nullable String deleteOption;
        private @Nullable String detachOption;
        private Double diskIOPSReadWrite;
        private Double diskMBpsReadWrite;
        private @Nullable Integer diskSizeGB;
        private @Nullable VirtualHardDiskResponse image;
        private Integer lun;
        private @Nullable ManagedDiskParametersResponse managedDisk;
        private @Nullable String name;
        private @Nullable Boolean toBeDetached;
        private @Nullable VirtualHardDiskResponse vhd;
        private @Nullable Boolean writeAcceleratorEnabled;
        public Builder() {}
        public Builder(DataDiskResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.caching = defaults.caching;
    	      this.createOption = defaults.createOption;
    	      this.deleteOption = defaults.deleteOption;
    	      this.detachOption = defaults.detachOption;
    	      this.diskIOPSReadWrite = defaults.diskIOPSReadWrite;
    	      this.diskMBpsReadWrite = defaults.diskMBpsReadWrite;
    	      this.diskSizeGB = defaults.diskSizeGB;
    	      this.image = defaults.image;
    	      this.lun = defaults.lun;
    	      this.managedDisk = defaults.managedDisk;
    	      this.name = defaults.name;
    	      this.toBeDetached = defaults.toBeDetached;
    	      this.vhd = defaults.vhd;
    	      this.writeAcceleratorEnabled = defaults.writeAcceleratorEnabled;
        }

        @CustomType.Setter
        public Builder caching(@Nullable String caching) {

            this.caching = caching;
            return this;
        }
        @CustomType.Setter
        public Builder createOption(String createOption) {
            if (createOption == null) {
              throw new MissingRequiredPropertyException("DataDiskResponse", "createOption");
            }
            this.createOption = createOption;
            return this;
        }
        @CustomType.Setter
        public Builder deleteOption(@Nullable String deleteOption) {

            this.deleteOption = deleteOption;
            return this;
        }
        @CustomType.Setter
        public Builder detachOption(@Nullable String detachOption) {

            this.detachOption = detachOption;
            return this;
        }
        @CustomType.Setter
        public Builder diskIOPSReadWrite(Double diskIOPSReadWrite) {
            if (diskIOPSReadWrite == null) {
              throw new MissingRequiredPropertyException("DataDiskResponse", "diskIOPSReadWrite");
            }
            this.diskIOPSReadWrite = diskIOPSReadWrite;
            return this;
        }
        @CustomType.Setter
        public Builder diskMBpsReadWrite(Double diskMBpsReadWrite) {
            if (diskMBpsReadWrite == null) {
              throw new MissingRequiredPropertyException("DataDiskResponse", "diskMBpsReadWrite");
            }
            this.diskMBpsReadWrite = diskMBpsReadWrite;
            return this;
        }
        @CustomType.Setter
        public Builder diskSizeGB(@Nullable Integer diskSizeGB) {

            this.diskSizeGB = diskSizeGB;
            return this;
        }
        @CustomType.Setter
        public Builder image(@Nullable VirtualHardDiskResponse image) {

            this.image = image;
            return this;
        }
        @CustomType.Setter
        public Builder lun(Integer lun) {
            if (lun == null) {
              throw new MissingRequiredPropertyException("DataDiskResponse", "lun");
            }
            this.lun = lun;
            return this;
        }
        @CustomType.Setter
        public Builder managedDisk(@Nullable ManagedDiskParametersResponse managedDisk) {

            this.managedDisk = managedDisk;
            return this;
        }
        @CustomType.Setter
        public Builder name(@Nullable String name) {

            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder toBeDetached(@Nullable Boolean toBeDetached) {

            this.toBeDetached = toBeDetached;
            return this;
        }
        @CustomType.Setter
        public Builder vhd(@Nullable VirtualHardDiskResponse vhd) {

            this.vhd = vhd;
            return this;
        }
        @CustomType.Setter
        public Builder writeAcceleratorEnabled(@Nullable Boolean writeAcceleratorEnabled) {

            this.writeAcceleratorEnabled = writeAcceleratorEnabled;
            return this;
        }
        public DataDiskResponse build() {
            final var _resultValue = new DataDiskResponse();
            _resultValue.caching = caching;
            _resultValue.createOption = createOption;
            _resultValue.deleteOption = deleteOption;
            _resultValue.detachOption = detachOption;
            _resultValue.diskIOPSReadWrite = diskIOPSReadWrite;
            _resultValue.diskMBpsReadWrite = diskMBpsReadWrite;
            _resultValue.diskSizeGB = diskSizeGB;
            _resultValue.image = image;
            _resultValue.lun = lun;
            _resultValue.managedDisk = managedDisk;
            _resultValue.name = name;
            _resultValue.toBeDetached = toBeDetached;
            _resultValue.vhd = vhd;
            _resultValue.writeAcceleratorEnabled = writeAcceleratorEnabled;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy