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

com.pulumi.azurenative.datafactory.inputs.VariableSpecificationArgs 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.VariableType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Definition of a single variable for a Pipeline.
 * 
 */
public final class VariableSpecificationArgs extends com.pulumi.resources.ResourceArgs {

    public static final VariableSpecificationArgs Empty = new VariableSpecificationArgs();

    /**
     * Default value of variable.
     * 
     */
    @Import(name="defaultValue")
    private @Nullable Output defaultValue;

    /**
     * @return Default value of variable.
     * 
     */
    public Optional> defaultValue() {
        return Optional.ofNullable(this.defaultValue);
    }

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

    /**
     * @return Variable type.
     * 
     */
    public Output> type() {
        return this.type;
    }

    private VariableSpecificationArgs() {}

    private VariableSpecificationArgs(VariableSpecificationArgs $) {
        this.defaultValue = $.defaultValue;
        this.type = $.type;
    }

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

    public static final class Builder {
        private VariableSpecificationArgs $;

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

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

        /**
         * @param defaultValue Default value of variable.
         * 
         * @return builder
         * 
         */
        public Builder defaultValue(@Nullable Output defaultValue) {
            $.defaultValue = defaultValue;
            return this;
        }

        /**
         * @param defaultValue Default value of variable.
         * 
         * @return builder
         * 
         */
        public Builder defaultValue(Object defaultValue) {
            return defaultValue(Output.of(defaultValue));
        }

        /**
         * @param type Variable type.
         * 
         * @return builder
         * 
         */
        public Builder type(Output> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Variable type.
         * 
         * @return builder
         * 
         */
        public Builder type(Either type) {
            return type(Output.of(type));
        }

        /**
         * @param type Variable type.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Either.ofLeft(type));
        }

        /**
         * @param type Variable type.
         * 
         * @return builder
         * 
         */
        public Builder type(VariableType type) {
            return type(Either.ofRight(type));
        }

        public VariableSpecificationArgs build() {
            if ($.type == null) {
                throw new MissingRequiredPropertyException("VariableSpecificationArgs", "type");
            }
            return $;
        }
    }

}