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

com.pulumi.consul.inputs.PreparedQueryFailoverArgs 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.consul.inputs.PreparedQueryFailoverTargetArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PreparedQueryFailoverArgs Empty = new PreparedQueryFailoverArgs();

    /**
     * Remote datacenters to return results from.
     * 
     */
    @Import(name="datacenters")
    private @Nullable Output> datacenters;

    /**
     * @return Remote datacenters to return results from.
     * 
     */
    public Optional>> datacenters() {
        return Optional.ofNullable(this.datacenters);
    }

    /**
     * Return results from this many datacenters, sorted in ascending order of estimated RTT.
     * 
     */
    @Import(name="nearestN")
    private @Nullable Output nearestN;

    /**
     * @return Return results from this many datacenters, sorted in ascending order of estimated RTT.
     * 
     */
    public Optional> nearestN() {
        return Optional.ofNullable(this.nearestN);
    }

    /**
     * Specifies a sequential list of remote datacenters and cluster peers to failover to if there are no healthy service instances in the local datacenter. This option cannot be used with `nearest_n` or `datacenters`.
     * 
     */
    @Import(name="targets")
    private @Nullable Output> targets;

    /**
     * @return Specifies a sequential list of remote datacenters and cluster peers to failover to if there are no healthy service instances in the local datacenter. This option cannot be used with `nearest_n` or `datacenters`.
     * 
     */
    public Optional>> targets() {
        return Optional.ofNullable(this.targets);
    }

    private PreparedQueryFailoverArgs() {}

    private PreparedQueryFailoverArgs(PreparedQueryFailoverArgs $) {
        this.datacenters = $.datacenters;
        this.nearestN = $.nearestN;
        this.targets = $.targets;
    }

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

    public static final class Builder {
        private PreparedQueryFailoverArgs $;

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

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

        /**
         * @param datacenters Remote datacenters to return results from.
         * 
         * @return builder
         * 
         */
        public Builder datacenters(@Nullable Output> datacenters) {
            $.datacenters = datacenters;
            return this;
        }

        /**
         * @param datacenters Remote datacenters to return results from.
         * 
         * @return builder
         * 
         */
        public Builder datacenters(List datacenters) {
            return datacenters(Output.of(datacenters));
        }

        /**
         * @param datacenters Remote datacenters to return results from.
         * 
         * @return builder
         * 
         */
        public Builder datacenters(String... datacenters) {
            return datacenters(List.of(datacenters));
        }

        /**
         * @param nearestN Return results from this many datacenters, sorted in ascending order of estimated RTT.
         * 
         * @return builder
         * 
         */
        public Builder nearestN(@Nullable Output nearestN) {
            $.nearestN = nearestN;
            return this;
        }

        /**
         * @param nearestN Return results from this many datacenters, sorted in ascending order of estimated RTT.
         * 
         * @return builder
         * 
         */
        public Builder nearestN(Integer nearestN) {
            return nearestN(Output.of(nearestN));
        }

        /**
         * @param targets Specifies a sequential list of remote datacenters and cluster peers to failover to if there are no healthy service instances in the local datacenter. This option cannot be used with `nearest_n` or `datacenters`.
         * 
         * @return builder
         * 
         */
        public Builder targets(@Nullable Output> targets) {
            $.targets = targets;
            return this;
        }

        /**
         * @param targets Specifies a sequential list of remote datacenters and cluster peers to failover to if there are no healthy service instances in the local datacenter. This option cannot be used with `nearest_n` or `datacenters`.
         * 
         * @return builder
         * 
         */
        public Builder targets(List targets) {
            return targets(Output.of(targets));
        }

        /**
         * @param targets Specifies a sequential list of remote datacenters and cluster peers to failover to if there are no healthy service instances in the local datacenter. This option cannot be used with `nearest_n` or `datacenters`.
         * 
         * @return builder
         * 
         */
        public Builder targets(PreparedQueryFailoverTargetArgs... targets) {
            return targets(List.of(targets));
        }

        public PreparedQueryFailoverArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy