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

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

import com.pulumi.azurenative.datafactory.enums.ActivityOnInactiveMarkAs;
import com.pulumi.azurenative.datafactory.enums.ActivityState;
import com.pulumi.azurenative.datafactory.enums.HDInsightActivityDebugInfoOption;
import com.pulumi.azurenative.datafactory.inputs.ActivityDependencyArgs;
import com.pulumi.azurenative.datafactory.inputs.ActivityPolicyArgs;
import com.pulumi.azurenative.datafactory.inputs.LinkedServiceReferenceArgs;
import com.pulumi.azurenative.datafactory.inputs.UserPropertyArgs;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * HDInsight Spark activity.
 * 
 */
public final class HDInsightSparkActivityArgs extends com.pulumi.resources.ResourceArgs {

    public static final HDInsightSparkActivityArgs Empty = new HDInsightSparkActivityArgs();

    /**
     * The user-specified arguments to HDInsightSparkActivity.
     * 
     */
    @Import(name="arguments")
    private @Nullable Output> arguments;

    /**
     * @return The user-specified arguments to HDInsightSparkActivity.
     * 
     */
    public Optional>> arguments() {
        return Optional.ofNullable(this.arguments);
    }

    /**
     * The application's Java/Spark main class.
     * 
     */
    @Import(name="className")
    private @Nullable Output className;

    /**
     * @return The application's Java/Spark main class.
     * 
     */
    public Optional> className() {
        return Optional.ofNullable(this.className);
    }

    /**
     * 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);
    }

    /**
     * The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string).
     * 
     */
    @Import(name="entryFilePath", required=true)
    private Output entryFilePath;

    /**
     * @return The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string).
     * 
     */
    public Output entryFilePath() {
        return this.entryFilePath;
    }

    /**
     * Debug info option.
     * 
     */
    @Import(name="getDebugInfo")
    private @Nullable Output> getDebugInfo;

    /**
     * @return Debug info option.
     * 
     */
    public Optional>> getDebugInfo() {
        return Optional.ofNullable(this.getDebugInfo);
    }

    /**
     * Linked service reference.
     * 
     */
    @Import(name="linkedServiceName")
    private @Nullable Output linkedServiceName;

    /**
     * @return Linked service reference.
     * 
     */
    public Optional> linkedServiceName() {
        return Optional.ofNullable(this.linkedServiceName);
    }

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

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

    /**
     * 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 policy.
     * 
     */
    @Import(name="policy")
    private @Nullable Output policy;

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

    /**
     * The user to impersonate that will execute the job. Type: string (or Expression with resultType string).
     * 
     */
    @Import(name="proxyUser")
    private @Nullable Output proxyUser;

    /**
     * @return The user to impersonate that will execute the job. Type: string (or Expression with resultType string).
     * 
     */
    public Optional> proxyUser() {
        return Optional.ofNullable(this.proxyUser);
    }

    /**
     * The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string).
     * 
     */
    @Import(name="rootPath", required=true)
    private Output rootPath;

    /**
     * @return The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string).
     * 
     */
    public Output rootPath() {
        return this.rootPath;
    }

    /**
     * Spark configuration property.
     * 
     */
    @Import(name="sparkConfig")
    private @Nullable Output> sparkConfig;

    /**
     * @return Spark configuration property.
     * 
     */
    public Optional>> sparkConfig() {
        return Optional.ofNullable(this.sparkConfig);
    }

    /**
     * The storage linked service for uploading the entry file and dependencies, and for receiving logs.
     * 
     */
    @Import(name="sparkJobLinkedService")
    private @Nullable Output sparkJobLinkedService;

    /**
     * @return The storage linked service for uploading the entry file and dependencies, and for receiving logs.
     * 
     */
    public Optional> sparkJobLinkedService() {
        return Optional.ofNullable(this.sparkJobLinkedService);
    }

    /**
     * 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 'HDInsightSpark'.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return Type of activity.
     * Expected value is 'HDInsightSpark'.
     * 
     */
    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 HDInsightSparkActivityArgs() {}

    private HDInsightSparkActivityArgs(HDInsightSparkActivityArgs $) {
        this.arguments = $.arguments;
        this.className = $.className;
        this.dependsOn = $.dependsOn;
        this.description = $.description;
        this.entryFilePath = $.entryFilePath;
        this.getDebugInfo = $.getDebugInfo;
        this.linkedServiceName = $.linkedServiceName;
        this.name = $.name;
        this.onInactiveMarkAs = $.onInactiveMarkAs;
        this.policy = $.policy;
        this.proxyUser = $.proxyUser;
        this.rootPath = $.rootPath;
        this.sparkConfig = $.sparkConfig;
        this.sparkJobLinkedService = $.sparkJobLinkedService;
        this.state = $.state;
        this.type = $.type;
        this.userProperties = $.userProperties;
    }

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

    public static final class Builder {
        private HDInsightSparkActivityArgs $;

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

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

        /**
         * @param arguments The user-specified arguments to HDInsightSparkActivity.
         * 
         * @return builder
         * 
         */
        public Builder arguments(@Nullable Output> arguments) {
            $.arguments = arguments;
            return this;
        }

        /**
         * @param arguments The user-specified arguments to HDInsightSparkActivity.
         * 
         * @return builder
         * 
         */
        public Builder arguments(List arguments) {
            return arguments(Output.of(arguments));
        }

        /**
         * @param arguments The user-specified arguments to HDInsightSparkActivity.
         * 
         * @return builder
         * 
         */
        public Builder arguments(Object... arguments) {
            return arguments(List.of(arguments));
        }

        /**
         * @param className The application's Java/Spark main class.
         * 
         * @return builder
         * 
         */
        public Builder className(@Nullable Output className) {
            $.className = className;
            return this;
        }

        /**
         * @param className The application's Java/Spark main class.
         * 
         * @return builder
         * 
         */
        public Builder className(String className) {
            return className(Output.of(className));
        }

        /**
         * @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 entryFilePath The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string).
         * 
         * @return builder
         * 
         */
        public Builder entryFilePath(Output entryFilePath) {
            $.entryFilePath = entryFilePath;
            return this;
        }

        /**
         * @param entryFilePath The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string).
         * 
         * @return builder
         * 
         */
        public Builder entryFilePath(Object entryFilePath) {
            return entryFilePath(Output.of(entryFilePath));
        }

        /**
         * @param getDebugInfo Debug info option.
         * 
         * @return builder
         * 
         */
        public Builder getDebugInfo(@Nullable Output> getDebugInfo) {
            $.getDebugInfo = getDebugInfo;
            return this;
        }

        /**
         * @param getDebugInfo Debug info option.
         * 
         * @return builder
         * 
         */
        public Builder getDebugInfo(Either getDebugInfo) {
            return getDebugInfo(Output.of(getDebugInfo));
        }

        /**
         * @param getDebugInfo Debug info option.
         * 
         * @return builder
         * 
         */
        public Builder getDebugInfo(String getDebugInfo) {
            return getDebugInfo(Either.ofLeft(getDebugInfo));
        }

        /**
         * @param getDebugInfo Debug info option.
         * 
         * @return builder
         * 
         */
        public Builder getDebugInfo(HDInsightActivityDebugInfoOption getDebugInfo) {
            return getDebugInfo(Either.ofRight(getDebugInfo));
        }

        /**
         * @param linkedServiceName Linked service reference.
         * 
         * @return builder
         * 
         */
        public Builder linkedServiceName(@Nullable Output linkedServiceName) {
            $.linkedServiceName = linkedServiceName;
            return this;
        }

        /**
         * @param linkedServiceName Linked service reference.
         * 
         * @return builder
         * 
         */
        public Builder linkedServiceName(LinkedServiceReferenceArgs linkedServiceName) {
            return linkedServiceName(Output.of(linkedServiceName));
        }

        /**
         * @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 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 policy Activity policy.
         * 
         * @return builder
         * 
         */
        public Builder policy(@Nullable Output policy) {
            $.policy = policy;
            return this;
        }

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

        /**
         * @param proxyUser The user to impersonate that will execute the job. Type: string (or Expression with resultType string).
         * 
         * @return builder
         * 
         */
        public Builder proxyUser(@Nullable Output proxyUser) {
            $.proxyUser = proxyUser;
            return this;
        }

        /**
         * @param proxyUser The user to impersonate that will execute the job. Type: string (or Expression with resultType string).
         * 
         * @return builder
         * 
         */
        public Builder proxyUser(Object proxyUser) {
            return proxyUser(Output.of(proxyUser));
        }

        /**
         * @param rootPath The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string).
         * 
         * @return builder
         * 
         */
        public Builder rootPath(Output rootPath) {
            $.rootPath = rootPath;
            return this;
        }

        /**
         * @param rootPath The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string).
         * 
         * @return builder
         * 
         */
        public Builder rootPath(Object rootPath) {
            return rootPath(Output.of(rootPath));
        }

        /**
         * @param sparkConfig Spark configuration property.
         * 
         * @return builder
         * 
         */
        public Builder sparkConfig(@Nullable Output> sparkConfig) {
            $.sparkConfig = sparkConfig;
            return this;
        }

        /**
         * @param sparkConfig Spark configuration property.
         * 
         * @return builder
         * 
         */
        public Builder sparkConfig(Map sparkConfig) {
            return sparkConfig(Output.of(sparkConfig));
        }

        /**
         * @param sparkJobLinkedService The storage linked service for uploading the entry file and dependencies, and for receiving logs.
         * 
         * @return builder
         * 
         */
        public Builder sparkJobLinkedService(@Nullable Output sparkJobLinkedService) {
            $.sparkJobLinkedService = sparkJobLinkedService;
            return this;
        }

        /**
         * @param sparkJobLinkedService The storage linked service for uploading the entry file and dependencies, and for receiving logs.
         * 
         * @return builder
         * 
         */
        public Builder sparkJobLinkedService(LinkedServiceReferenceArgs sparkJobLinkedService) {
            return sparkJobLinkedService(Output.of(sparkJobLinkedService));
        }

        /**
         * @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 'HDInsightSpark'.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Type of activity.
         * Expected value is 'HDInsightSpark'.
         * 
         * @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 HDInsightSparkActivityArgs build() {
            if ($.entryFilePath == null) {
                throw new MissingRequiredPropertyException("HDInsightSparkActivityArgs", "entryFilePath");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("HDInsightSparkActivityArgs", "name");
            }
            if ($.rootPath == null) {
                throw new MissingRequiredPropertyException("HDInsightSparkActivityArgs", "rootPath");
            }
            $.type = Codegen.stringProp("type").output().arg($.type).require();
            return $;
        }
    }

}