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

com.pulumi.azurenative.testbase.inputs.CommandArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.testbase.inputs;

import com.pulumi.azurenative.testbase.enums.Action;
import com.pulumi.azurenative.testbase.enums.ContentType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The command used in the test
 * 
 */
public final class CommandArgs extends com.pulumi.resources.ResourceArgs {

    public static final CommandArgs Empty = new CommandArgs();

    /**
     * The action of the command.
     * 
     */
    @Import(name="action", required=true)
    private Output> action;

    /**
     * @return The action of the command.
     * 
     */
    public Output> action() {
        return this.action;
    }

    /**
     * Specifies whether to run the command even if a previous command is failed.
     * 
     */
    @Import(name="alwaysRun")
    private @Nullable Output alwaysRun;

    /**
     * @return Specifies whether to run the command even if a previous command is failed.
     * 
     */
    public Optional> alwaysRun() {
        return Optional.ofNullable(this.alwaysRun);
    }

    /**
     * Specifies whether to apply update before the command.
     * 
     */
    @Import(name="applyUpdateBefore")
    private @Nullable Output applyUpdateBefore;

    /**
     * @return Specifies whether to apply update before the command.
     * 
     */
    public Optional> applyUpdateBefore() {
        return Optional.ofNullable(this.applyUpdateBefore);
    }

    /**
     * The content of the command. The content depends on source type.
     * 
     */
    @Import(name="content", required=true)
    private Output content;

    /**
     * @return The content of the command. The content depends on source type.
     * 
     */
    public Output content() {
        return this.content;
    }

    /**
     * The type of command content.
     * 
     */
    @Import(name="contentType", required=true)
    private Output> contentType;

    /**
     * @return The type of command content.
     * 
     */
    public Output> contentType() {
        return this.contentType;
    }

    /**
     * Specifies whether to enroll Intune before the command.
     * 
     */
    @Import(name="enrollIntuneBefore")
    private @Nullable Output enrollIntuneBefore;

    /**
     * @return Specifies whether to enroll Intune before the command.
     * 
     */
    public Optional> enrollIntuneBefore() {
        return Optional.ofNullable(this.enrollIntuneBefore);
    }

    /**
     * Specifies whether to install first party applications before running the command.
     * 
     */
    @Import(name="install1PAppBefore")
    private @Nullable Output install1PAppBefore;

    /**
     * @return Specifies whether to install first party applications before running the command.
     * 
     */
    public Optional> install1PAppBefore() {
        return Optional.ofNullable(this.install1PAppBefore);
    }

    /**
     * Specifies the max run time of the command.
     * 
     */
    @Import(name="maxRunTime")
    private @Nullable Output maxRunTime;

    /**
     * @return Specifies the max run time of the command.
     * 
     */
    public Optional> maxRunTime() {
        return Optional.ofNullable(this.maxRunTime);
    }

    /**
     * The name of the command.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return The name of the command.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * Specifies whether the command is assigned to be executed after in-place upgrade.
     * 
     */
    @Import(name="postUpgrade")
    private @Nullable Output postUpgrade;

    /**
     * @return Specifies whether the command is assigned to be executed after in-place upgrade.
     * 
     */
    public Optional> postUpgrade() {
        return Optional.ofNullable(this.postUpgrade);
    }

    /**
     * Specifies whether the command is assigned to be executed before in-place upgrade.
     * 
     */
    @Import(name="preUpgrade")
    private @Nullable Output preUpgrade;

    /**
     * @return Specifies whether the command is assigned to be executed before in-place upgrade.
     * 
     */
    public Optional> preUpgrade() {
        return Optional.ofNullable(this.preUpgrade);
    }

    /**
     * Specifies whether to restart the VM after the command executed.
     * 
     */
    @Import(name="restartAfter")
    private @Nullable Output restartAfter;

    /**
     * @return Specifies whether to restart the VM after the command executed.
     * 
     */
    public Optional> restartAfter() {
        return Optional.ofNullable(this.restartAfter);
    }

    /**
     * Specifies whether to run the command in interactive mode.
     * 
     */
    @Import(name="runAsInteractive")
    private @Nullable Output runAsInteractive;

    /**
     * @return Specifies whether to run the command in interactive mode.
     * 
     */
    public Optional> runAsInteractive() {
        return Optional.ofNullable(this.runAsInteractive);
    }

    /**
     * Specifies whether to run the command as administrator.
     * 
     */
    @Import(name="runElevated")
    private @Nullable Output runElevated;

    /**
     * @return Specifies whether to run the command as administrator.
     * 
     */
    public Optional> runElevated() {
        return Optional.ofNullable(this.runElevated);
    }

    private CommandArgs() {}

    private CommandArgs(CommandArgs $) {
        this.action = $.action;
        this.alwaysRun = $.alwaysRun;
        this.applyUpdateBefore = $.applyUpdateBefore;
        this.content = $.content;
        this.contentType = $.contentType;
        this.enrollIntuneBefore = $.enrollIntuneBefore;
        this.install1PAppBefore = $.install1PAppBefore;
        this.maxRunTime = $.maxRunTime;
        this.name = $.name;
        this.postUpgrade = $.postUpgrade;
        this.preUpgrade = $.preUpgrade;
        this.restartAfter = $.restartAfter;
        this.runAsInteractive = $.runAsInteractive;
        this.runElevated = $.runElevated;
    }

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

    public static final class Builder {
        private CommandArgs $;

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

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

        /**
         * @param action The action of the command.
         * 
         * @return builder
         * 
         */
        public Builder action(Output> action) {
            $.action = action;
            return this;
        }

        /**
         * @param action The action of the command.
         * 
         * @return builder
         * 
         */
        public Builder action(Either action) {
            return action(Output.of(action));
        }

        /**
         * @param action The action of the command.
         * 
         * @return builder
         * 
         */
        public Builder action(String action) {
            return action(Either.ofLeft(action));
        }

        /**
         * @param action The action of the command.
         * 
         * @return builder
         * 
         */
        public Builder action(Action action) {
            return action(Either.ofRight(action));
        }

        /**
         * @param alwaysRun Specifies whether to run the command even if a previous command is failed.
         * 
         * @return builder
         * 
         */
        public Builder alwaysRun(@Nullable Output alwaysRun) {
            $.alwaysRun = alwaysRun;
            return this;
        }

        /**
         * @param alwaysRun Specifies whether to run the command even if a previous command is failed.
         * 
         * @return builder
         * 
         */
        public Builder alwaysRun(Boolean alwaysRun) {
            return alwaysRun(Output.of(alwaysRun));
        }

        /**
         * @param applyUpdateBefore Specifies whether to apply update before the command.
         * 
         * @return builder
         * 
         */
        public Builder applyUpdateBefore(@Nullable Output applyUpdateBefore) {
            $.applyUpdateBefore = applyUpdateBefore;
            return this;
        }

        /**
         * @param applyUpdateBefore Specifies whether to apply update before the command.
         * 
         * @return builder
         * 
         */
        public Builder applyUpdateBefore(Boolean applyUpdateBefore) {
            return applyUpdateBefore(Output.of(applyUpdateBefore));
        }

        /**
         * @param content The content of the command. The content depends on source type.
         * 
         * @return builder
         * 
         */
        public Builder content(Output content) {
            $.content = content;
            return this;
        }

        /**
         * @param content The content of the command. The content depends on source type.
         * 
         * @return builder
         * 
         */
        public Builder content(String content) {
            return content(Output.of(content));
        }

        /**
         * @param contentType The type of command content.
         * 
         * @return builder
         * 
         */
        public Builder contentType(Output> contentType) {
            $.contentType = contentType;
            return this;
        }

        /**
         * @param contentType The type of command content.
         * 
         * @return builder
         * 
         */
        public Builder contentType(Either contentType) {
            return contentType(Output.of(contentType));
        }

        /**
         * @param contentType The type of command content.
         * 
         * @return builder
         * 
         */
        public Builder contentType(String contentType) {
            return contentType(Either.ofLeft(contentType));
        }

        /**
         * @param contentType The type of command content.
         * 
         * @return builder
         * 
         */
        public Builder contentType(ContentType contentType) {
            return contentType(Either.ofRight(contentType));
        }

        /**
         * @param enrollIntuneBefore Specifies whether to enroll Intune before the command.
         * 
         * @return builder
         * 
         */
        public Builder enrollIntuneBefore(@Nullable Output enrollIntuneBefore) {
            $.enrollIntuneBefore = enrollIntuneBefore;
            return this;
        }

        /**
         * @param enrollIntuneBefore Specifies whether to enroll Intune before the command.
         * 
         * @return builder
         * 
         */
        public Builder enrollIntuneBefore(Boolean enrollIntuneBefore) {
            return enrollIntuneBefore(Output.of(enrollIntuneBefore));
        }

        /**
         * @param install1PAppBefore Specifies whether to install first party applications before running the command.
         * 
         * @return builder
         * 
         */
        public Builder install1PAppBefore(@Nullable Output install1PAppBefore) {
            $.install1PAppBefore = install1PAppBefore;
            return this;
        }

        /**
         * @param install1PAppBefore Specifies whether to install first party applications before running the command.
         * 
         * @return builder
         * 
         */
        public Builder install1PAppBefore(Boolean install1PAppBefore) {
            return install1PAppBefore(Output.of(install1PAppBefore));
        }

        /**
         * @param maxRunTime Specifies the max run time of the command.
         * 
         * @return builder
         * 
         */
        public Builder maxRunTime(@Nullable Output maxRunTime) {
            $.maxRunTime = maxRunTime;
            return this;
        }

        /**
         * @param maxRunTime Specifies the max run time of the command.
         * 
         * @return builder
         * 
         */
        public Builder maxRunTime(Integer maxRunTime) {
            return maxRunTime(Output.of(maxRunTime));
        }

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

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

        /**
         * @param postUpgrade Specifies whether the command is assigned to be executed after in-place upgrade.
         * 
         * @return builder
         * 
         */
        public Builder postUpgrade(@Nullable Output postUpgrade) {
            $.postUpgrade = postUpgrade;
            return this;
        }

        /**
         * @param postUpgrade Specifies whether the command is assigned to be executed after in-place upgrade.
         * 
         * @return builder
         * 
         */
        public Builder postUpgrade(Boolean postUpgrade) {
            return postUpgrade(Output.of(postUpgrade));
        }

        /**
         * @param preUpgrade Specifies whether the command is assigned to be executed before in-place upgrade.
         * 
         * @return builder
         * 
         */
        public Builder preUpgrade(@Nullable Output preUpgrade) {
            $.preUpgrade = preUpgrade;
            return this;
        }

        /**
         * @param preUpgrade Specifies whether the command is assigned to be executed before in-place upgrade.
         * 
         * @return builder
         * 
         */
        public Builder preUpgrade(Boolean preUpgrade) {
            return preUpgrade(Output.of(preUpgrade));
        }

        /**
         * @param restartAfter Specifies whether to restart the VM after the command executed.
         * 
         * @return builder
         * 
         */
        public Builder restartAfter(@Nullable Output restartAfter) {
            $.restartAfter = restartAfter;
            return this;
        }

        /**
         * @param restartAfter Specifies whether to restart the VM after the command executed.
         * 
         * @return builder
         * 
         */
        public Builder restartAfter(Boolean restartAfter) {
            return restartAfter(Output.of(restartAfter));
        }

        /**
         * @param runAsInteractive Specifies whether to run the command in interactive mode.
         * 
         * @return builder
         * 
         */
        public Builder runAsInteractive(@Nullable Output runAsInteractive) {
            $.runAsInteractive = runAsInteractive;
            return this;
        }

        /**
         * @param runAsInteractive Specifies whether to run the command in interactive mode.
         * 
         * @return builder
         * 
         */
        public Builder runAsInteractive(Boolean runAsInteractive) {
            return runAsInteractive(Output.of(runAsInteractive));
        }

        /**
         * @param runElevated Specifies whether to run the command as administrator.
         * 
         * @return builder
         * 
         */
        public Builder runElevated(@Nullable Output runElevated) {
            $.runElevated = runElevated;
            return this;
        }

        /**
         * @param runElevated Specifies whether to run the command as administrator.
         * 
         * @return builder
         * 
         */
        public Builder runElevated(Boolean runElevated) {
            return runElevated(Output.of(runElevated));
        }

        public CommandArgs build() {
            if ($.action == null) {
                throw new MissingRequiredPropertyException("CommandArgs", "action");
            }
            if ($.content == null) {
                throw new MissingRequiredPropertyException("CommandArgs", "content");
            }
            if ($.contentType == null) {
                throw new MissingRequiredPropertyException("CommandArgs", "contentType");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("CommandArgs", "name");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy