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

com.pulumi.azurenative.sql.inputs.JobStepActionArgs 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.sql.inputs;

import com.pulumi.azurenative.sql.enums.JobStepActionSource;
import com.pulumi.azurenative.sql.enums.JobStepActionType;
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.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The action to be executed by a job step.
 * 
 */
public final class JobStepActionArgs extends com.pulumi.resources.ResourceArgs {

    public static final JobStepActionArgs Empty = new JobStepActionArgs();

    /**
     * The source of the action to execute.
     * 
     */
    @Import(name="source")
    private @Nullable Output> source;

    /**
     * @return The source of the action to execute.
     * 
     */
    public Optional>> source() {
        return Optional.ofNullable(this.source);
    }

    /**
     * Type of action being executed by the job step.
     * 
     */
    @Import(name="type")
    private @Nullable Output> type;

    /**
     * @return Type of action being executed by the job step.
     * 
     */
    public Optional>> type() {
        return Optional.ofNullable(this.type);
    }

    /**
     * The action value, for example the text of the T-SQL script to execute.
     * 
     */
    @Import(name="value", required=true)
    private Output value;

    /**
     * @return The action value, for example the text of the T-SQL script to execute.
     * 
     */
    public Output value() {
        return this.value;
    }

    private JobStepActionArgs() {}

    private JobStepActionArgs(JobStepActionArgs $) {
        this.source = $.source;
        this.type = $.type;
        this.value = $.value;
    }

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

    public static final class Builder {
        private JobStepActionArgs $;

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

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

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

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

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

        /**
         * @param source The source of the action to execute.
         * 
         * @return builder
         * 
         */
        public Builder source(JobStepActionSource source) {
            return source(Either.ofRight(source));
        }

        /**
         * @param type Type of action being executed by the job step.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Type of action being executed by the job step.
         * 
         * @return builder
         * 
         */
        public Builder type(Either type) {
            return type(Output.of(type));
        }

        /**
         * @param type Type of action being executed by the job step.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Either.ofLeft(type));
        }

        /**
         * @param type Type of action being executed by the job step.
         * 
         * @return builder
         * 
         */
        public Builder type(JobStepActionType type) {
            return type(Either.ofRight(type));
        }

        /**
         * @param value The action value, for example the text of the T-SQL script to execute.
         * 
         * @return builder
         * 
         */
        public Builder value(Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value The action value, for example the text of the T-SQL script to execute.
         * 
         * @return builder
         * 
         */
        public Builder value(String value) {
            return value(Output.of(value));
        }

        public JobStepActionArgs build() {
            $.source = Codegen.stringProp("source").left(JobStepActionSource.class).output().arg($.source).def("Inline").getNullable();
            $.type = Codegen.stringProp("type").left(JobStepActionType.class).output().arg($.type).def("TSql").getNullable();
            if ($.value == null) {
                throw new MissingRequiredPropertyException("JobStepActionArgs", "value");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy