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

com.pulumi.azurenative.datafactory.inputs.SwitchActivityArgs 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.datafactory.inputs;

import com.pulumi.azurenative.datafactory.enums.ActivityOnInactiveMarkAs;
import com.pulumi.azurenative.datafactory.enums.ActivityState;
import com.pulumi.azurenative.datafactory.inputs.ActivityDependencyArgs;
import com.pulumi.azurenative.datafactory.inputs.AppendVariableActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.AzureDataExplorerCommandActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.AzureFunctionActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.AzureMLBatchExecutionActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.AzureMLExecutePipelineActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.AzureMLUpdateResourceActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ControlActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.CopyActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.CustomActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.DataLakeAnalyticsUSQLActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.DatabricksNotebookActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.DatabricksSparkJarActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.DatabricksSparkPythonActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.DeleteActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ExecuteDataFlowActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ExecutePipelineActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ExecuteSSISPackageActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ExecuteWranglingDataflowActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ExecutionActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ExpressionArgs;
import com.pulumi.azurenative.datafactory.inputs.FailActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.FilterActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ForEachActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.GetMetadataActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.HDInsightHiveActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.HDInsightMapReduceActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.HDInsightPigActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.HDInsightSparkActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.HDInsightStreamingActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.IfConditionActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.LookupActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.ScriptActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.SetVariableActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.SqlServerStoredProcedureActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.SwitchCaseArgs;
import com.pulumi.azurenative.datafactory.inputs.SynapseNotebookActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.SynapseSparkJobDefinitionActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.UntilActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.UserPropertyArgs;
import com.pulumi.azurenative.datafactory.inputs.ValidationActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.WaitActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.WebActivityArgs;
import com.pulumi.azurenative.datafactory.inputs.WebHookActivityArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * This activity evaluates an expression and executes activities under the cases property that correspond to the expression evaluation expected in the equals property.
 * 
 */
public final class SwitchActivityArgs extends com.pulumi.resources.ResourceArgs {

    public static final SwitchActivityArgs Empty = new SwitchActivityArgs();

    /**
     * List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     * 
     */
    @Import(name="cases")
    private @Nullable Output> cases;

    /**
     * @return List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     * 
     */
    public Optional>> cases() {
        return Optional.ofNullable(this.cases);
    }

    /**
     * List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
     * 
     */
    @Import(name="defaultActivities")
    private @Nullable Output> defaultActivities;

    /**
     * @return List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
     * 
     */
    public Optional>> defaultActivities() {
        return Optional.ofNullable(this.defaultActivities);
    }

    /**
     * Activity depends on condition.
     * 
     */
    @Import(name="dependsOn")
    private @Nullable Output> dependsOn;

    /**
     * @return Activity depends on condition.
     * 
     */
    public Optional>> dependsOn() {
        return Optional.ofNullable(this.dependsOn);
    }

    /**
     * Activity description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Activity description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Activity name.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Activity name.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.
     * 
     */
    @Import(name="on", required=true)
    private Output on;

    /**
     * @return An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.
     * 
     */
    public Output on() {
        return this.on;
    }

    /**
     * Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
     * 
     */
    @Import(name="onInactiveMarkAs")
    private @Nullable Output> onInactiveMarkAs;

    /**
     * @return Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
     * 
     */
    public Optional>> onInactiveMarkAs() {
        return Optional.ofNullable(this.onInactiveMarkAs);
    }

    /**
     * Activity state. This is an optional property and if not provided, the state will be Active by default.
     * 
     */
    @Import(name="state")
    private @Nullable Output> state;

    /**
     * @return Activity state. This is an optional property and if not provided, the state will be Active by default.
     * 
     */
    public Optional>> state() {
        return Optional.ofNullable(this.state);
    }

    /**
     * Type of activity.
     * Expected value is 'Switch'.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return Type of activity.
     * Expected value is 'Switch'.
     * 
     */
    public Output type() {
        return this.type;
    }

    /**
     * Activity user properties.
     * 
     */
    @Import(name="userProperties")
    private @Nullable Output> userProperties;

    /**
     * @return Activity user properties.
     * 
     */
    public Optional>> userProperties() {
        return Optional.ofNullable(this.userProperties);
    }

    private SwitchActivityArgs() {}

    private SwitchActivityArgs(SwitchActivityArgs $) {
        this.cases = $.cases;
        this.defaultActivities = $.defaultActivities;
        this.dependsOn = $.dependsOn;
        this.description = $.description;
        this.name = $.name;
        this.on = $.on;
        this.onInactiveMarkAs = $.onInactiveMarkAs;
        this.state = $.state;
        this.type = $.type;
        this.userProperties = $.userProperties;
    }

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

    public static final class Builder {
        private SwitchActivityArgs $;

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

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

        /**
         * @param cases List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
         * 
         * @return builder
         * 
         */
        public Builder cases(@Nullable Output> cases) {
            $.cases = cases;
            return this;
        }

        /**
         * @param cases List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
         * 
         * @return builder
         * 
         */
        public Builder cases(List cases) {
            return cases(Output.of(cases));
        }

        /**
         * @param cases List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
         * 
         * @return builder
         * 
         */
        public Builder cases(SwitchCaseArgs... cases) {
            return cases(List.of(cases));
        }

        /**
         * @param defaultActivities List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
         * 
         * @return builder
         * 
         */
        public Builder defaultActivities(@Nullable Output> defaultActivities) {
            $.defaultActivities = defaultActivities;
            return this;
        }

        /**
         * @param defaultActivities List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
         * 
         * @return builder
         * 
         */
        public Builder defaultActivities(List defaultActivities) {
            return defaultActivities(Output.of(defaultActivities));
        }

        /**
         * @param defaultActivities List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
         * 
         * @return builder
         * 
         */
        public Builder defaultActivities(Object... defaultActivities) {
            return defaultActivities(List.of(defaultActivities));
        }

        /**
         * @param dependsOn Activity depends on condition.
         * 
         * @return builder
         * 
         */
        public Builder dependsOn(@Nullable Output> dependsOn) {
            $.dependsOn = dependsOn;
            return this;
        }

        /**
         * @param dependsOn Activity depends on condition.
         * 
         * @return builder
         * 
         */
        public Builder dependsOn(List dependsOn) {
            return dependsOn(Output.of(dependsOn));
        }

        /**
         * @param dependsOn Activity depends on condition.
         * 
         * @return builder
         * 
         */
        public Builder dependsOn(ActivityDependencyArgs... dependsOn) {
            return dependsOn(List.of(dependsOn));
        }

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

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

        /**
         * @param name Activity name.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

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

        /**
         * @param on An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.
         * 
         * @return builder
         * 
         */
        public Builder on(Output on) {
            $.on = on;
            return this;
        }

        /**
         * @param on An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.
         * 
         * @return builder
         * 
         */
        public Builder on(ExpressionArgs on) {
            return on(Output.of(on));
        }

        /**
         * @param onInactiveMarkAs Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
         * 
         * @return builder
         * 
         */
        public Builder onInactiveMarkAs(@Nullable Output> onInactiveMarkAs) {
            $.onInactiveMarkAs = onInactiveMarkAs;
            return this;
        }

        /**
         * @param onInactiveMarkAs Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
         * 
         * @return builder
         * 
         */
        public Builder onInactiveMarkAs(Either onInactiveMarkAs) {
            return onInactiveMarkAs(Output.of(onInactiveMarkAs));
        }

        /**
         * @param onInactiveMarkAs Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
         * 
         * @return builder
         * 
         */
        public Builder onInactiveMarkAs(String onInactiveMarkAs) {
            return onInactiveMarkAs(Either.ofLeft(onInactiveMarkAs));
        }

        /**
         * @param onInactiveMarkAs Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
         * 
         * @return builder
         * 
         */
        public Builder onInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs) {
            return onInactiveMarkAs(Either.ofRight(onInactiveMarkAs));
        }

        /**
         * @param state Activity state. This is an optional property and if not provided, the state will be Active by default.
         * 
         * @return builder
         * 
         */
        public Builder state(@Nullable Output> state) {
            $.state = state;
            return this;
        }

        /**
         * @param state Activity state. This is an optional property and if not provided, the state will be Active by default.
         * 
         * @return builder
         * 
         */
        public Builder state(Either state) {
            return state(Output.of(state));
        }

        /**
         * @param state Activity state. This is an optional property and if not provided, the state will be Active by default.
         * 
         * @return builder
         * 
         */
        public Builder state(String state) {
            return state(Either.ofLeft(state));
        }

        /**
         * @param state Activity state. This is an optional property and if not provided, the state will be Active by default.
         * 
         * @return builder
         * 
         */
        public Builder state(ActivityState state) {
            return state(Either.ofRight(state));
        }

        /**
         * @param type Type of activity.
         * Expected value is 'Switch'.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Type of activity.
         * Expected value is 'Switch'.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        /**
         * @param userProperties Activity user properties.
         * 
         * @return builder
         * 
         */
        public Builder userProperties(@Nullable Output> userProperties) {
            $.userProperties = userProperties;
            return this;
        }

        /**
         * @param userProperties Activity user properties.
         * 
         * @return builder
         * 
         */
        public Builder userProperties(List userProperties) {
            return userProperties(Output.of(userProperties));
        }

        /**
         * @param userProperties Activity user properties.
         * 
         * @return builder
         * 
         */
        public Builder userProperties(UserPropertyArgs... userProperties) {
            return userProperties(List.of(userProperties));
        }

        public SwitchActivityArgs build() {
            if ($.name == null) {
                throw new MissingRequiredPropertyException("SwitchActivityArgs", "name");
            }
            if ($.on == null) {
                throw new MissingRequiredPropertyException("SwitchActivityArgs", "on");
            }
            $.type = Codegen.stringProp("type").output().arg($.type).require();
            return $;
        }
    }

}