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

com.pulumi.azurenative.datafactory.outputs.ScriptActivityResponse Maven / Gradle / Ivy

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

import com.pulumi.azurenative.datafactory.outputs.ActivityDependencyResponse;
import com.pulumi.azurenative.datafactory.outputs.ActivityPolicyResponse;
import com.pulumi.azurenative.datafactory.outputs.LinkedServiceReferenceResponse;
import com.pulumi.azurenative.datafactory.outputs.ScriptActivityScriptBlockResponse;
import com.pulumi.azurenative.datafactory.outputs.ScriptActivityTypePropertiesResponseLogSettings;
import com.pulumi.azurenative.datafactory.outputs.UserPropertyResponse;
import com.pulumi.core.annotations.CustomType;
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;

@CustomType
public final class ScriptActivityResponse {
    /**
     * @return Activity depends on condition.
     * 
     */
    private @Nullable List dependsOn;
    /**
     * @return Activity description.
     * 
     */
    private @Nullable String description;
    /**
     * @return Linked service reference.
     * 
     */
    private LinkedServiceReferenceResponse linkedServiceName;
    /**
     * @return Log settings of script activity.
     * 
     */
    private @Nullable ScriptActivityTypePropertiesResponseLogSettings logSettings;
    /**
     * @return Activity name.
     * 
     */
    private String name;
    /**
     * @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.
     * 
     */
    private @Nullable String onInactiveMarkAs;
    /**
     * @return Activity policy.
     * 
     */
    private @Nullable ActivityPolicyResponse policy;
    /**
     * @return ScriptBlock execution timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
     * 
     */
    private @Nullable Object scriptBlockExecutionTimeout;
    /**
     * @return Array of script blocks. Type: array.
     * 
     */
    private @Nullable List scripts;
    /**
     * @return Activity state. This is an optional property and if not provided, the state will be Active by default.
     * 
     */
    private @Nullable String state;
    /**
     * @return Type of activity.
     * Expected value is 'Script'.
     * 
     */
    private String type;
    /**
     * @return Activity user properties.
     * 
     */
    private @Nullable List userProperties;

    private ScriptActivityResponse() {}
    /**
     * @return Activity depends on condition.
     * 
     */
    public List dependsOn() {
        return this.dependsOn == null ? List.of() : this.dependsOn;
    }
    /**
     * @return Activity description.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return Linked service reference.
     * 
     */
    public LinkedServiceReferenceResponse linkedServiceName() {
        return this.linkedServiceName;
    }
    /**
     * @return Log settings of script activity.
     * 
     */
    public Optional logSettings() {
        return Optional.ofNullable(this.logSettings);
    }
    /**
     * @return Activity name.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @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);
    }
    /**
     * @return Activity policy.
     * 
     */
    public Optional policy() {
        return Optional.ofNullable(this.policy);
    }
    /**
     * @return ScriptBlock execution timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
     * 
     */
    public Optional scriptBlockExecutionTimeout() {
        return Optional.ofNullable(this.scriptBlockExecutionTimeout);
    }
    /**
     * @return Array of script blocks. Type: array.
     * 
     */
    public List scripts() {
        return this.scripts == null ? List.of() : this.scripts;
    }
    /**
     * @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);
    }
    /**
     * @return Type of activity.
     * Expected value is 'Script'.
     * 
     */
    public String type() {
        return this.type;
    }
    /**
     * @return Activity user properties.
     * 
     */
    public List userProperties() {
        return this.userProperties == null ? List.of() : this.userProperties;
    }

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

    public static Builder builder(ScriptActivityResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List dependsOn;
        private @Nullable String description;
        private LinkedServiceReferenceResponse linkedServiceName;
        private @Nullable ScriptActivityTypePropertiesResponseLogSettings logSettings;
        private String name;
        private @Nullable String onInactiveMarkAs;
        private @Nullable ActivityPolicyResponse policy;
        private @Nullable Object scriptBlockExecutionTimeout;
        private @Nullable List scripts;
        private @Nullable String state;
        private String type;
        private @Nullable List userProperties;
        public Builder() {}
        public Builder(ScriptActivityResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.dependsOn = defaults.dependsOn;
    	      this.description = defaults.description;
    	      this.linkedServiceName = defaults.linkedServiceName;
    	      this.logSettings = defaults.logSettings;
    	      this.name = defaults.name;
    	      this.onInactiveMarkAs = defaults.onInactiveMarkAs;
    	      this.policy = defaults.policy;
    	      this.scriptBlockExecutionTimeout = defaults.scriptBlockExecutionTimeout;
    	      this.scripts = defaults.scripts;
    	      this.state = defaults.state;
    	      this.type = defaults.type;
    	      this.userProperties = defaults.userProperties;
        }

        @CustomType.Setter
        public Builder dependsOn(@Nullable List dependsOn) {

            this.dependsOn = dependsOn;
            return this;
        }
        public Builder dependsOn(ActivityDependencyResponse... dependsOn) {
            return dependsOn(List.of(dependsOn));
        }
        @CustomType.Setter
        public Builder description(@Nullable String description) {

            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder linkedServiceName(LinkedServiceReferenceResponse linkedServiceName) {
            if (linkedServiceName == null) {
              throw new MissingRequiredPropertyException("ScriptActivityResponse", "linkedServiceName");
            }
            this.linkedServiceName = linkedServiceName;
            return this;
        }
        @CustomType.Setter
        public Builder logSettings(@Nullable ScriptActivityTypePropertiesResponseLogSettings logSettings) {

            this.logSettings = logSettings;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("ScriptActivityResponse", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder onInactiveMarkAs(@Nullable String onInactiveMarkAs) {

            this.onInactiveMarkAs = onInactiveMarkAs;
            return this;
        }
        @CustomType.Setter
        public Builder policy(@Nullable ActivityPolicyResponse policy) {

            this.policy = policy;
            return this;
        }
        @CustomType.Setter
        public Builder scriptBlockExecutionTimeout(@Nullable Object scriptBlockExecutionTimeout) {

            this.scriptBlockExecutionTimeout = scriptBlockExecutionTimeout;
            return this;
        }
        @CustomType.Setter
        public Builder scripts(@Nullable List scripts) {

            this.scripts = scripts;
            return this;
        }
        public Builder scripts(ScriptActivityScriptBlockResponse... scripts) {
            return scripts(List.of(scripts));
        }
        @CustomType.Setter
        public Builder state(@Nullable String state) {

            this.state = state;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("ScriptActivityResponse", "type");
            }
            this.type = type;
            return this;
        }
        @CustomType.Setter
        public Builder userProperties(@Nullable List userProperties) {

            this.userProperties = userProperties;
            return this;
        }
        public Builder userProperties(UserPropertyResponse... userProperties) {
            return userProperties(List.of(userProperties));
        }
        public ScriptActivityResponse build() {
            final var _resultValue = new ScriptActivityResponse();
            _resultValue.dependsOn = dependsOn;
            _resultValue.description = description;
            _resultValue.linkedServiceName = linkedServiceName;
            _resultValue.logSettings = logSettings;
            _resultValue.name = name;
            _resultValue.onInactiveMarkAs = onInactiveMarkAs;
            _resultValue.policy = policy;
            _resultValue.scriptBlockExecutionTimeout = scriptBlockExecutionTimeout;
            _resultValue.scripts = scripts;
            _resultValue.state = state;
            _resultValue.type = type;
            _resultValue.userProperties = userProperties;
            return _resultValue;
        }
    }
}