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

com.pulumi.azurenative.compute.inputs.GalleryDataDiskImageArgs 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.inputs;

import com.pulumi.azurenative.compute.enums.HostCaching;
import com.pulumi.azurenative.compute.inputs.GalleryDiskImageSourceArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * This is the data disk image.
 * 
 */
public final class GalleryDataDiskImageArgs extends com.pulumi.resources.ResourceArgs {

    public static final GalleryDataDiskImageArgs Empty = new GalleryDataDiskImageArgs();

    /**
     * The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
     * 
     */
    @Import(name="hostCaching")
    private @Nullable Output hostCaching;

    /**
     * @return The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
     * 
     */
    public Optional> hostCaching() {
        return Optional.ofNullable(this.hostCaching);
    }

    /**
     * This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
     * 
     */
    @Import(name="lun", required=true)
    private Output lun;

    /**
     * @return This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
     * 
     */
    public Output lun() {
        return this.lun;
    }

    /**
     * The source for the disk image.
     * 
     */
    @Import(name="source")
    private @Nullable Output source;

    /**
     * @return The source for the disk image.
     * 
     */
    public Optional> source() {
        return Optional.ofNullable(this.source);
    }

    private GalleryDataDiskImageArgs() {}

    private GalleryDataDiskImageArgs(GalleryDataDiskImageArgs $) {
        this.hostCaching = $.hostCaching;
        this.lun = $.lun;
        this.source = $.source;
    }

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

    public static final class Builder {
        private GalleryDataDiskImageArgs $;

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

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

        /**
         * @param hostCaching The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
         * 
         * @return builder
         * 
         */
        public Builder hostCaching(@Nullable Output hostCaching) {
            $.hostCaching = hostCaching;
            return this;
        }

        /**
         * @param hostCaching The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
         * 
         * @return builder
         * 
         */
        public Builder hostCaching(HostCaching hostCaching) {
            return hostCaching(Output.of(hostCaching));
        }

        /**
         * @param lun This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
         * 
         * @return builder
         * 
         */
        public Builder lun(Output lun) {
            $.lun = lun;
            return this;
        }

        /**
         * @param lun This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
         * 
         * @return builder
         * 
         */
        public Builder lun(Integer lun) {
            return lun(Output.of(lun));
        }

        /**
         * @param source The source for the disk image.
         * 
         * @return builder
         * 
         */
        public Builder source(@Nullable Output source) {
            $.source = source;
            return this;
        }

        /**
         * @param source The source for the disk image.
         * 
         * @return builder
         * 
         */
        public Builder source(GalleryDiskImageSourceArgs source) {
            return source(Output.of(source));
        }

        public GalleryDataDiskImageArgs build() {
            if ($.lun == null) {
                throw new MissingRequiredPropertyException("GalleryDataDiskImageArgs", "lun");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy