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

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

There is a newer version: 3.13.0-alpha.1732771629
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.consul.inputs;

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


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

    public static final KeysKeyArgs Empty = new KeysKeyArgs();

    @Import(name="default")
    private @Nullable Output default_;

    public Optional> default_() {
        return Optional.ofNullable(this.default_);
    }

    /**
     * If true, then the key will be deleted when
     * either its configuration block is removed from the configuration or
     * the entire resource is destroyed. Otherwise, it will be left in Consul.
     * Defaults to false.
     * 
     */
    @Import(name="delete")
    private @Nullable Output delete;

    /**
     * @return If true, then the key will be deleted when
     * either its configuration block is removed from the configuration or
     * the entire resource is destroyed. Otherwise, it will be left in Consul.
     * Defaults to false.
     * 
     */
    public Optional> delete() {
        return Optional.ofNullable(this.delete);
    }

    /**
     * An [unsigned integer value](https://www.consul.io/api/kv.html#flags-1)
     * to attach to the key (defaults to 0).
     * 
     */
    @Import(name="flags")
    private @Nullable Output flags;

    /**
     * @return An [unsigned integer value](https://www.consul.io/api/kv.html#flags-1)
     * to attach to the key (defaults to 0).
     * 
     */
    public Optional> flags() {
        return Optional.ofNullable(this.flags);
    }

    /**
     * @deprecated
     * Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead
     * 
     */
    @Deprecated /* Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @deprecated
     * Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead
     * 
     */
    @Deprecated /* Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

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

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

    /**
     * The value to write to the given path.
     * 
     */
    @Import(name="value")
    private @Nullable Output value;

    /**
     * @return The value to write to the given path.
     * 
     */
    public Optional> value() {
        return Optional.ofNullable(this.value);
    }

    private KeysKeyArgs() {}

    private KeysKeyArgs(KeysKeyArgs $) {
        this.default_ = $.default_;
        this.delete = $.delete;
        this.flags = $.flags;
        this.name = $.name;
        this.path = $.path;
        this.value = $.value;
    }

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

    public static final class Builder {
        private KeysKeyArgs $;

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

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

        public Builder default_(@Nullable Output default_) {
            $.default_ = default_;
            return this;
        }

        public Builder default_(String default_) {
            return default_(Output.of(default_));
        }

        /**
         * @param delete If true, then the key will be deleted when
         * either its configuration block is removed from the configuration or
         * the entire resource is destroyed. Otherwise, it will be left in Consul.
         * Defaults to false.
         * 
         * @return builder
         * 
         */
        public Builder delete(@Nullable Output delete) {
            $.delete = delete;
            return this;
        }

        /**
         * @param delete If true, then the key will be deleted when
         * either its configuration block is removed from the configuration or
         * the entire resource is destroyed. Otherwise, it will be left in Consul.
         * Defaults to false.
         * 
         * @return builder
         * 
         */
        public Builder delete(Boolean delete) {
            return delete(Output.of(delete));
        }

        /**
         * @param flags An [unsigned integer value](https://www.consul.io/api/kv.html#flags-1)
         * to attach to the key (defaults to 0).
         * 
         * @return builder
         * 
         */
        public Builder flags(@Nullable Output flags) {
            $.flags = flags;
            return this;
        }

        /**
         * @param flags An [unsigned integer value](https://www.consul.io/api/kv.html#flags-1)
         * to attach to the key (defaults to 0).
         * 
         * @return builder
         * 
         */
        public Builder flags(Integer flags) {
            return flags(Output.of(flags));
        }

        /**
         * @return builder
         * 
         * @deprecated
         * Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead
         * 
         */
        @Deprecated /* Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @return builder
         * 
         * @deprecated
         * Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead
         * 
         */
        @Deprecated /* Using consul_keys resource to *read* is deprecated; please use consul_keys data source instead */
        public Builder name(String name) {
            return name(Output.of(name));
        }

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

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

        /**
         * @param value The value to write to the given path.
         * 
         * @return builder
         * 
         */
        public Builder value(@Nullable Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value The value to write to the given path.
         * 
         * @return builder
         * 
         */
        public Builder value(String value) {
            return value(Output.of(value));
        }

        public KeysKeyArgs build() {
            $.path = Objects.requireNonNull($.path, "expected parameter 'path' to be non-null");
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy