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

com.pulumi.consul.outputs.ConfigEntryServiceResolverFailover 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.outputs;

import com.pulumi.consul.outputs.ConfigEntryServiceResolverFailoverTarget;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ConfigEntryServiceResolverFailover {
    /**
     * @return Specifies an ordered list of datacenters at the failover location to attempt connections to during a failover scenario. When Consul cannot establish a connection with the first datacenter in the list, it proceeds sequentially until establishing a connection with another datacenter.
     * 
     */
    private @Nullable List datacenters;
    /**
     * @return Specifies the namespace at the failover location where the failover services are deployed.
     * 
     */
    private @Nullable String namespace;
    /**
     * @return Specifies the sameness group at the failover location where the failover services are deployed.
     * 
     */
    private @Nullable String samenessGroup;
    /**
     * @return Specifies the name of the service to resolve at the failover location during a failover scenario.
     * 
     */
    private @Nullable String service;
    /**
     * @return Specifies the name of a subset of service instances to resolve at the failover location during a failover scenario.
     * 
     */
    private @Nullable String serviceSubset;
    /**
     * @return Name of subset.
     * 
     */
    private String subsetName;
    /**
     * @return Specifies a fixed list of failover targets to try during failover. This list can express complicated failover scenarios.
     * 
     */
    private @Nullable List targets;

    private ConfigEntryServiceResolverFailover() {}
    /**
     * @return Specifies an ordered list of datacenters at the failover location to attempt connections to during a failover scenario. When Consul cannot establish a connection with the first datacenter in the list, it proceeds sequentially until establishing a connection with another datacenter.
     * 
     */
    public List datacenters() {
        return this.datacenters == null ? List.of() : this.datacenters;
    }
    /**
     * @return Specifies the namespace at the failover location where the failover services are deployed.
     * 
     */
    public Optional namespace() {
        return Optional.ofNullable(this.namespace);
    }
    /**
     * @return Specifies the sameness group at the failover location where the failover services are deployed.
     * 
     */
    public Optional samenessGroup() {
        return Optional.ofNullable(this.samenessGroup);
    }
    /**
     * @return Specifies the name of the service to resolve at the failover location during a failover scenario.
     * 
     */
    public Optional service() {
        return Optional.ofNullable(this.service);
    }
    /**
     * @return Specifies the name of a subset of service instances to resolve at the failover location during a failover scenario.
     * 
     */
    public Optional serviceSubset() {
        return Optional.ofNullable(this.serviceSubset);
    }
    /**
     * @return Name of subset.
     * 
     */
    public String subsetName() {
        return this.subsetName;
    }
    /**
     * @return Specifies a fixed list of failover targets to try during failover. This list can express complicated failover scenarios.
     * 
     */
    public List targets() {
        return this.targets == null ? List.of() : this.targets;
    }

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

    public static Builder builder(ConfigEntryServiceResolverFailover defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List datacenters;
        private @Nullable String namespace;
        private @Nullable String samenessGroup;
        private @Nullable String service;
        private @Nullable String serviceSubset;
        private String subsetName;
        private @Nullable List targets;
        public Builder() {}
        public Builder(ConfigEntryServiceResolverFailover defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.datacenters = defaults.datacenters;
    	      this.namespace = defaults.namespace;
    	      this.samenessGroup = defaults.samenessGroup;
    	      this.service = defaults.service;
    	      this.serviceSubset = defaults.serviceSubset;
    	      this.subsetName = defaults.subsetName;
    	      this.targets = defaults.targets;
        }

        @CustomType.Setter
        public Builder datacenters(@Nullable List datacenters) {
            this.datacenters = datacenters;
            return this;
        }
        public Builder datacenters(String... datacenters) {
            return datacenters(List.of(datacenters));
        }
        @CustomType.Setter
        public Builder namespace(@Nullable String namespace) {
            this.namespace = namespace;
            return this;
        }
        @CustomType.Setter
        public Builder samenessGroup(@Nullable String samenessGroup) {
            this.samenessGroup = samenessGroup;
            return this;
        }
        @CustomType.Setter
        public Builder service(@Nullable String service) {
            this.service = service;
            return this;
        }
        @CustomType.Setter
        public Builder serviceSubset(@Nullable String serviceSubset) {
            this.serviceSubset = serviceSubset;
            return this;
        }
        @CustomType.Setter
        public Builder subsetName(String subsetName) {
            this.subsetName = Objects.requireNonNull(subsetName);
            return this;
        }
        @CustomType.Setter
        public Builder targets(@Nullable List targets) {
            this.targets = targets;
            return this;
        }
        public Builder targets(ConfigEntryServiceResolverFailoverTarget... targets) {
            return targets(List.of(targets));
        }
        public ConfigEntryServiceResolverFailover build() {
            final var _resultValue = new ConfigEntryServiceResolverFailover();
            _resultValue.datacenters = datacenters;
            _resultValue.namespace = namespace;
            _resultValue.samenessGroup = samenessGroup;
            _resultValue.service = service;
            _resultValue.serviceSubset = serviceSubset;
            _resultValue.subsetName = subsetName;
            _resultValue.targets = targets;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy