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

com.pulumi.azurenative.azurestackhci.MachineExtensionArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.azurestackhci;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final MachineExtensionArgs Empty = new MachineExtensionArgs();

    /**
     * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
     * 
     */
    @Import(name="autoUpgradeMinorVersion")
    private @Nullable Output autoUpgradeMinorVersion;

    /**
     * @return Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
     * 
     */
    public Optional> autoUpgradeMinorVersion() {
        return Optional.ofNullable(this.autoUpgradeMinorVersion);
    }

    /**
     * The name of the machine extension.
     * 
     */
    @Import(name="extensionName")
    private @Nullable Output extensionName;

    /**
     * @return The name of the machine extension.
     * 
     */
    public Optional> extensionName() {
        return Optional.ofNullable(this.extensionName);
    }

    /**
     * How the extension handler should be forced to update even if the extension configuration has not changed.
     * 
     */
    @Import(name="forceUpdateTag")
    private @Nullable Output forceUpdateTag;

    /**
     * @return How the extension handler should be forced to update even if the extension configuration has not changed.
     * 
     */
    public Optional> forceUpdateTag() {
        return Optional.ofNullable(this.forceUpdateTag);
    }

    /**
     * The location.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The location.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The name of the machine where the extension should be created or updated.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return The name of the machine where the extension should be created or updated.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
     * 
     */
    @Import(name="protectedSettings")
    private @Nullable Output protectedSettings;

    /**
     * @return The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
     * 
     */
    public Optional> protectedSettings() {
        return Optional.ofNullable(this.protectedSettings);
    }

    /**
     * The name of the extension handler publisher.
     * 
     */
    @Import(name="publisher")
    private @Nullable Output publisher;

    /**
     * @return The name of the extension handler publisher.
     * 
     */
    public Optional> publisher() {
        return Optional.ofNullable(this.publisher);
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Json formatted public settings for the extension.
     * 
     */
    @Import(name="settings")
    private @Nullable Output settings;

    /**
     * @return Json formatted public settings for the extension.
     * 
     */
    public Optional> settings() {
        return Optional.ofNullable(this.settings);
    }

    /**
     * The Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return The Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Specifies the type of the extension; an example is "CustomScriptExtension".
     * 
     */
    @Import(name="type")
    private @Nullable Output type;

    /**
     * @return Specifies the type of the extension; an example is "CustomScriptExtension".
     * 
     */
    public Optional> type() {
        return Optional.ofNullable(this.type);
    }

    /**
     * Specifies the version of the script handler.
     * 
     */
    @Import(name="typeHandlerVersion")
    private @Nullable Output typeHandlerVersion;

    /**
     * @return Specifies the version of the script handler.
     * 
     */
    public Optional> typeHandlerVersion() {
        return Optional.ofNullable(this.typeHandlerVersion);
    }

    private MachineExtensionArgs() {}

    private MachineExtensionArgs(MachineExtensionArgs $) {
        this.autoUpgradeMinorVersion = $.autoUpgradeMinorVersion;
        this.extensionName = $.extensionName;
        this.forceUpdateTag = $.forceUpdateTag;
        this.location = $.location;
        this.name = $.name;
        this.protectedSettings = $.protectedSettings;
        this.publisher = $.publisher;
        this.resourceGroupName = $.resourceGroupName;
        this.settings = $.settings;
        this.tags = $.tags;
        this.type = $.type;
        this.typeHandlerVersion = $.typeHandlerVersion;
    }

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

    public static final class Builder {
        private MachineExtensionArgs $;

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

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

        /**
         * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
         * 
         * @return builder
         * 
         */
        public Builder autoUpgradeMinorVersion(@Nullable Output autoUpgradeMinorVersion) {
            $.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
            return this;
        }

        /**
         * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
         * 
         * @return builder
         * 
         */
        public Builder autoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
            return autoUpgradeMinorVersion(Output.of(autoUpgradeMinorVersion));
        }

        /**
         * @param extensionName The name of the machine extension.
         * 
         * @return builder
         * 
         */
        public Builder extensionName(@Nullable Output extensionName) {
            $.extensionName = extensionName;
            return this;
        }

        /**
         * @param extensionName The name of the machine extension.
         * 
         * @return builder
         * 
         */
        public Builder extensionName(String extensionName) {
            return extensionName(Output.of(extensionName));
        }

        /**
         * @param forceUpdateTag How the extension handler should be forced to update even if the extension configuration has not changed.
         * 
         * @return builder
         * 
         */
        public Builder forceUpdateTag(@Nullable Output forceUpdateTag) {
            $.forceUpdateTag = forceUpdateTag;
            return this;
        }

        /**
         * @param forceUpdateTag How the extension handler should be forced to update even if the extension configuration has not changed.
         * 
         * @return builder
         * 
         */
        public Builder forceUpdateTag(String forceUpdateTag) {
            return forceUpdateTag(Output.of(forceUpdateTag));
        }

        /**
         * @param location The location.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The location.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name The name of the machine where the extension should be created or updated.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the machine where the extension should be created or updated.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param protectedSettings The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
         * 
         * @return builder
         * 
         */
        public Builder protectedSettings(@Nullable Output protectedSettings) {
            $.protectedSettings = protectedSettings;
            return this;
        }

        /**
         * @param protectedSettings The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
         * 
         * @return builder
         * 
         */
        public Builder protectedSettings(Object protectedSettings) {
            return protectedSettings(Output.of(protectedSettings));
        }

        /**
         * @param publisher The name of the extension handler publisher.
         * 
         * @return builder
         * 
         */
        public Builder publisher(@Nullable Output publisher) {
            $.publisher = publisher;
            return this;
        }

        /**
         * @param publisher The name of the extension handler publisher.
         * 
         * @return builder
         * 
         */
        public Builder publisher(String publisher) {
            return publisher(Output.of(publisher));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param settings Json formatted public settings for the extension.
         * 
         * @return builder
         * 
         */
        public Builder settings(@Nullable Output settings) {
            $.settings = settings;
            return this;
        }

        /**
         * @param settings Json formatted public settings for the extension.
         * 
         * @return builder
         * 
         */
        public Builder settings(Object settings) {
            return settings(Output.of(settings));
        }

        /**
         * @param tags The Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags The Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param type Specifies the type of the extension; an example is "CustomScriptExtension".
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Specifies the type of the extension; an example is "CustomScriptExtension".
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        /**
         * @param typeHandlerVersion Specifies the version of the script handler.
         * 
         * @return builder
         * 
         */
        public Builder typeHandlerVersion(@Nullable Output typeHandlerVersion) {
            $.typeHandlerVersion = typeHandlerVersion;
            return this;
        }

        /**
         * @param typeHandlerVersion Specifies the version of the script handler.
         * 
         * @return builder
         * 
         */
        public Builder typeHandlerVersion(String typeHandlerVersion) {
            return typeHandlerVersion(Output.of(typeHandlerVersion));
        }

        public MachineExtensionArgs build() {
            if ($.name == null) {
                throw new MissingRequiredPropertyException("MachineExtensionArgs", "name");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("MachineExtensionArgs", "resourceGroupName");
            }
            return $;
        }
    }

}