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

import com.pulumi.azure.devtest.inputs.LinuxVirtualMachineGalleryImageReferenceArgs;
import com.pulumi.azure.devtest.inputs.LinuxVirtualMachineInboundNatRuleArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final LinuxVirtualMachineArgs Empty = new LinuxVirtualMachineArgs();

    /**
     * Can this Virtual Machine be claimed by users? Defaults to `true`.
     * 
     */
    @Import(name="allowClaim")
    private @Nullable Output<Boolean> allowClaim;

    /**
     * @return Can this Virtual Machine be claimed by users? Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> allowClaim() {
        return Optional.ofNullable(this.allowClaim);
    }

    /**
     * Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
     * 
     */
    @Import(name="disallowPublicIpAddress")
    private @Nullable Output<Boolean> disallowPublicIpAddress;

    /**
     * @return Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<Boolean>> disallowPublicIpAddress() {
        return Optional.ofNullable(this.disallowPublicIpAddress);
    }

    /**
     * A `gallery_image_reference` block as defined below.
     * 
     */
    @Import(name="galleryImageReference", required=true)
    private Output<LinuxVirtualMachineGalleryImageReferenceArgs> galleryImageReference;

    /**
     * @return A `gallery_image_reference` block as defined below.
     * 
     */
    public Output<LinuxVirtualMachineGalleryImageReferenceArgs> galleryImageReference() {
        return this.galleryImageReference;
    }

    /**
     * One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     * 
     */
    @Import(name="inboundNatRules")
    private @Nullable Output<List<LinuxVirtualMachineInboundNatRuleArgs>> inboundNatRules;

    /**
     * @return One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     * 
     */
    public Optional<Output<List<LinuxVirtualMachineInboundNatRuleArgs>>> inboundNatRules() {
        return Optional.ofNullable(this.inboundNatRules);
    }

    /**
     * Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="labName", required=true)
    private Output<String> labName;

    /**
     * @return Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> labName() {
        return this.labName;
    }

    /**
     * The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="labSubnetName", required=true)
    private Output<String> labSubnetName;

    /**
     * @return The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> labSubnetName() {
        return this.labSubnetName;
    }

    /**
     * The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="labVirtualNetworkId", required=true)
    private Output<String> labVirtualNetworkId;

    /**
     * @return The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> labVirtualNetworkId() {
        return this.labVirtualNetworkId;
    }

    /**
     * Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output<String> location;

    /**
     * @return Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Any notes about the Virtual Machine.
     * 
     */
    @Import(name="notes")
    private @Nullable Output<String> notes;

    /**
     * @return Any notes about the Virtual Machine.
     * 
     */
    public Optional<Output<String>> notes() {
        return Optional.ofNullable(this.notes);
    }

    /**
     * The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="password")
    private @Nullable Output<String> password;

    /**
     * @return The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> password() {
        return Optional.ofNullable(this.password);
    }

    /**
     * The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="size", required=true)
    private Output<String> size;

    /**
     * @return The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> size() {
        return this.size;
    }

    /**
     * The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** One or either `password` or `ssh_key` must be specified.
     * 
     */
    @Import(name="sshKey")
    private @Nullable Output<String> sshKey;

    /**
     * @return The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** One or either `password` or `ssh_key` must be specified.
     * 
     */
    public Optional<Output<String>> sshKey() {
        return Optional.ofNullable(this.sshKey);
    }

    /**
     * The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`.
     * 
     */
    @Import(name="storageType", required=true)
    private Output<String> storageType;

    /**
     * @return The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`.
     * 
     */
    public Output<String> storageType() {
        return this.storageType;
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="username", required=true)
    private Output<String> username;

    /**
     * @return The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> username() {
        return this.username;
    }

    private LinuxVirtualMachineArgs() {}

    private LinuxVirtualMachineArgs(LinuxVirtualMachineArgs $) {
        this.allowClaim = $.allowClaim;
        this.disallowPublicIpAddress = $.disallowPublicIpAddress;
        this.galleryImageReference = $.galleryImageReference;
        this.inboundNatRules = $.inboundNatRules;
        this.labName = $.labName;
        this.labSubnetName = $.labSubnetName;
        this.labVirtualNetworkId = $.labVirtualNetworkId;
        this.location = $.location;
        this.name = $.name;
        this.notes = $.notes;
        this.password = $.password;
        this.resourceGroupName = $.resourceGroupName;
        this.size = $.size;
        this.sshKey = $.sshKey;
        this.storageType = $.storageType;
        this.tags = $.tags;
        this.username = $.username;
    }

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

    public static final class Builder {
        private LinuxVirtualMachineArgs $;

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

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

        /**
         * @param allowClaim Can this Virtual Machine be claimed by users? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder allowClaim(@Nullable Output<Boolean> allowClaim) {
            $.allowClaim = allowClaim;
            return this;
        }

        /**
         * @param allowClaim Can this Virtual Machine be claimed by users? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder allowClaim(Boolean allowClaim) {
            return allowClaim(Output.of(allowClaim));
        }

        /**
         * @param disallowPublicIpAddress Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder disallowPublicIpAddress(@Nullable Output<Boolean> disallowPublicIpAddress) {
            $.disallowPublicIpAddress = disallowPublicIpAddress;
            return this;
        }

        /**
         * @param disallowPublicIpAddress Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder disallowPublicIpAddress(Boolean disallowPublicIpAddress) {
            return disallowPublicIpAddress(Output.of(disallowPublicIpAddress));
        }

        /**
         * @param galleryImageReference A `gallery_image_reference` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder galleryImageReference(Output<LinuxVirtualMachineGalleryImageReferenceArgs> galleryImageReference) {
            $.galleryImageReference = galleryImageReference;
            return this;
        }

        /**
         * @param galleryImageReference A `gallery_image_reference` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder galleryImageReference(LinuxVirtualMachineGalleryImageReferenceArgs galleryImageReference) {
            return galleryImageReference(Output.of(galleryImageReference));
        }

        /**
         * @param inboundNatRules One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder inboundNatRules(@Nullable Output<List<LinuxVirtualMachineInboundNatRuleArgs>> inboundNatRules) {
            $.inboundNatRules = inboundNatRules;
            return this;
        }

        /**
         * @param inboundNatRules One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder inboundNatRules(List<LinuxVirtualMachineInboundNatRuleArgs> inboundNatRules) {
            return inboundNatRules(Output.of(inboundNatRules));
        }

        /**
         * @param inboundNatRules One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder inboundNatRules(LinuxVirtualMachineInboundNatRuleArgs... inboundNatRules) {
            return inboundNatRules(List.of(inboundNatRules));
        }

        /**
         * @param labName Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labName(Output<String> labName) {
            $.labName = labName;
            return this;
        }

        /**
         * @param labName Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labName(String labName) {
            return labName(Output.of(labName));
        }

        /**
         * @param labSubnetName The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labSubnetName(Output<String> labSubnetName) {
            $.labSubnetName = labSubnetName;
            return this;
        }

        /**
         * @param labSubnetName The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labSubnetName(String labSubnetName) {
            return labSubnetName(Output.of(labSubnetName));
        }

        /**
         * @param labVirtualNetworkId The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labVirtualNetworkId(Output<String> labVirtualNetworkId) {
            $.labVirtualNetworkId = labVirtualNetworkId;
            return this;
        }

        /**
         * @param labVirtualNetworkId The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder labVirtualNetworkId(String labVirtualNetworkId) {
            return labVirtualNetworkId(Output.of(labVirtualNetworkId));
        }

        /**
         * @param location Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output<String> location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param notes Any notes about the Virtual Machine.
         * 
         * @return builder
         * 
         */
        public Builder notes(@Nullable Output<String> notes) {
            $.notes = notes;
            return this;
        }

        /**
         * @param notes Any notes about the Virtual Machine.
         * 
         * @return builder
         * 
         */
        public Builder notes(String notes) {
            return notes(Output.of(notes));
        }

        /**
         * @param password The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder password(@Nullable Output<String> password) {
            $.password = password;
            return this;
        }

        /**
         * @param password The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder password(String password) {
            return password(Output.of(password));
        }

        /**
         * @param resourceGroupName The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param size The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder size(Output<String> size) {
            $.size = size;
            return this;
        }

        /**
         * @param size The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder size(String size) {
            return size(Output.of(size));
        }

        /**
         * @param sshKey The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** One or either `password` or `ssh_key` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder sshKey(@Nullable Output<String> sshKey) {
            $.sshKey = sshKey;
            return this;
        }

        /**
         * @param sshKey The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** One or either `password` or `ssh_key` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder sshKey(String sshKey) {
            return sshKey(Output.of(sshKey));
        }

        /**
         * @param storageType The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`.
         * 
         * @return builder
         * 
         */
        public Builder storageType(Output<String> storageType) {
            $.storageType = storageType;
            return this;
        }

        /**
         * @param storageType The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`.
         * 
         * @return builder
         * 
         */
        public Builder storageType(String storageType) {
            return storageType(Output.of(storageType));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param username The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder username(Output<String> username) {
            $.username = username;
            return this;
        }

        /**
         * @param username The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder username(String username) {
            return username(Output.of(username));
        }

        public LinuxVirtualMachineArgs build() {
            $.galleryImageReference = Objects.requireNonNull($.galleryImageReference, "expected parameter 'galleryImageReference' to be non-null");
            $.labName = Objects.requireNonNull($.labName, "expected parameter 'labName' to be non-null");
            $.labSubnetName = Objects.requireNonNull($.labSubnetName, "expected parameter 'labSubnetName' to be non-null");
            $.labVirtualNetworkId = Objects.requireNonNull($.labVirtualNetworkId, "expected parameter 'labVirtualNetworkId' to be non-null");
            $.resourceGroupName = Objects.requireNonNull($.resourceGroupName, "expected parameter 'resourceGroupName' to be non-null");
            $.size = Objects.requireNonNull($.size, "expected parameter 'size' to be non-null");
            $.storageType = Objects.requireNonNull($.storageType, "expected parameter 'storageType' to be non-null");
            $.username = Objects.requireNonNull($.username, "expected parameter 'username' to be non-null");
            return $;
        }
    }

}
