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

com.pulumi.azurenative.testbase.inputs.TestArgs 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.TestType;
import com.pulumi.azurenative.testbase.inputs.CommandArgs;
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.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The definition of a Test.
 * 
 */
public final class TestArgs extends com.pulumi.resources.ResourceArgs {

    public static final TestArgs Empty = new TestArgs();

    /**
     * The commands used in the test.
     * 
     */
    @Import(name="commands", required=true)
    private Output> commands;

    /**
     * @return The commands used in the test.
     * 
     */
    public Output> commands() {
        return this.commands;
    }

    /**
     * Indicates if this test is active.It doesn't schedule test for not active Test.
     * 
     */
    @Import(name="isActive")
    private @Nullable Output isActive;

    /**
     * @return Indicates if this test is active.It doesn't schedule test for not active Test.
     * 
     */
    public Optional> isActive() {
        return Optional.ofNullable(this.isActive);
    }

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

    /**
     * @return The type of the test.
     * 
     */
    public Output> testType() {
        return this.testType;
    }

    private TestArgs() {}

    private TestArgs(TestArgs $) {
        this.commands = $.commands;
        this.isActive = $.isActive;
        this.testType = $.testType;
    }

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

    public static final class Builder {
        private TestArgs $;

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

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

        /**
         * @param commands The commands used in the test.
         * 
         * @return builder
         * 
         */
        public Builder commands(Output> commands) {
            $.commands = commands;
            return this;
        }

        /**
         * @param commands The commands used in the test.
         * 
         * @return builder
         * 
         */
        public Builder commands(List commands) {
            return commands(Output.of(commands));
        }

        /**
         * @param commands The commands used in the test.
         * 
         * @return builder
         * 
         */
        public Builder commands(CommandArgs... commands) {
            return commands(List.of(commands));
        }

        /**
         * @param isActive Indicates if this test is active.It doesn't schedule test for not active Test.
         * 
         * @return builder
         * 
         */
        public Builder isActive(@Nullable Output isActive) {
            $.isActive = isActive;
            return this;
        }

        /**
         * @param isActive Indicates if this test is active.It doesn't schedule test for not active Test.
         * 
         * @return builder
         * 
         */
        public Builder isActive(Boolean isActive) {
            return isActive(Output.of(isActive));
        }

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

        /**
         * @param testType The type of the test.
         * 
         * @return builder
         * 
         */
        public Builder testType(Either testType) {
            return testType(Output.of(testType));
        }

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

        /**
         * @param testType The type of the test.
         * 
         * @return builder
         * 
         */
        public Builder testType(TestType testType) {
            return testType(Either.ofRight(testType));
        }

        public TestArgs build() {
            if ($.commands == null) {
                throw new MissingRequiredPropertyException("TestArgs", "commands");
            }
            if ($.testType == null) {
                throw new MissingRequiredPropertyException("TestArgs", "testType");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy