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

com.pulumi.consul.inputs.GetKeysKeyArgs Maven / Gradle / Ivy

// *** 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.consul.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class GetKeysKeyArgs extends com.pulumi.resources.ResourceArgs {

    public static final GetKeysKeyArgs Empty = new GetKeysKeyArgs();

    /**
     * This is the default value to set for `var.<name>` if the key does not exist in Consul. Defaults to an empty string.
     * 
     */
    @Import(name="default")
    private @Nullable Output default_;

    /**
     * @return This is the default value to set for `var.<name>` if the key does not exist in Consul. Defaults to an empty string.
     * 
     */
    public Optional> default_() {
        return Optional.ofNullable(this.default_);
    }

    /**
     * This is the name of the key. This value of the key is exposed as `var.<name>`. This is not the path of the key in Consul.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return This is the name of the key. This value of the key is exposed as `var.<name>`. This is not the path of the key in Consul.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * This is the path in Consul that should be read or written to.
     * 
     */
    @Import(name="path", required=true)
    private Output path;

    /**
     * @return This is the path in Consul that should be read or written to.
     * 
     */
    public Output path() {
        return this.path;
    }

    private GetKeysKeyArgs() {}

    private GetKeysKeyArgs(GetKeysKeyArgs $) {
        this.default_ = $.default_;
        this.name = $.name;
        this.path = $.path;
    }

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

    public static final class Builder {
        private GetKeysKeyArgs $;

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

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

        /**
         * @param default_ This is the default value to set for `var.<name>` if the key does not exist in Consul. Defaults to an empty string.
         * 
         * @return builder
         * 
         */
        public Builder default_(@Nullable Output default_) {
            $.default_ = default_;
            return this;
        }

        /**
         * @param default_ This is the default value to set for `var.<name>` if the key does not exist in Consul. Defaults to an empty string.
         * 
         * @return builder
         * 
         */
        public Builder default_(String default_) {
            return default_(Output.of(default_));
        }

        /**
         * @param name This is the name of the key. This value of the key is exposed as `var.<name>`. This is not the path of the key in Consul.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name This is the name of the key. This value of the key is exposed as `var.<name>`. This is not the path of the key in Consul.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param path This is the path in Consul that should be read or written to.
         * 
         * @return builder
         * 
         */
        public Builder path(Output path) {
            $.path = path;
            return this;
        }

        /**
         * @param path This is the path in Consul that should be read or written to.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

        public GetKeysKeyArgs build() {
            if ($.name == null) {
                throw new MissingRequiredPropertyException("GetKeysKeyArgs", "name");
            }
            if ($.path == null) {
                throw new MissingRequiredPropertyException("GetKeysKeyArgs", "path");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy