com.pulumi.digitalocean.outputs.LoadBalancerGlbSettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of digitalocean Show documentation
Show all versions of digitalocean Show documentation
A Pulumi package for creating and managing DigitalOcean cloud resources.
// *** 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.digitalocean.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.digitalocean.outputs.LoadBalancerGlbSettingsCdn;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class LoadBalancerGlbSettings {
/**
* @return CDN configuration supporting the following:
*
*/
private @Nullable LoadBalancerGlbSettingsCdn cdn;
/**
* @return fail-over threshold
*
*/
private @Nullable Integer failoverThreshold;
/**
* @return region priority map
*
*/
private @Nullable Map regionPriorities;
/**
* @return An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`.
*
*/
private Integer targetPort;
/**
* @return The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: `http` and `https`.
*
*/
private String targetProtocol;
private LoadBalancerGlbSettings() {}
/**
* @return CDN configuration supporting the following:
*
*/
public Optional cdn() {
return Optional.ofNullable(this.cdn);
}
/**
* @return fail-over threshold
*
*/
public Optional failoverThreshold() {
return Optional.ofNullable(this.failoverThreshold);
}
/**
* @return region priority map
*
*/
public Map regionPriorities() {
return this.regionPriorities == null ? Map.of() : this.regionPriorities;
}
/**
* @return An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`.
*
*/
public Integer targetPort() {
return this.targetPort;
}
/**
* @return The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: `http` and `https`.
*
*/
public String targetProtocol() {
return this.targetProtocol;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(LoadBalancerGlbSettings defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable LoadBalancerGlbSettingsCdn cdn;
private @Nullable Integer failoverThreshold;
private @Nullable Map regionPriorities;
private Integer targetPort;
private String targetProtocol;
public Builder() {}
public Builder(LoadBalancerGlbSettings defaults) {
Objects.requireNonNull(defaults);
this.cdn = defaults.cdn;
this.failoverThreshold = defaults.failoverThreshold;
this.regionPriorities = defaults.regionPriorities;
this.targetPort = defaults.targetPort;
this.targetProtocol = defaults.targetProtocol;
}
@CustomType.Setter
public Builder cdn(@Nullable LoadBalancerGlbSettingsCdn cdn) {
this.cdn = cdn;
return this;
}
@CustomType.Setter
public Builder failoverThreshold(@Nullable Integer failoverThreshold) {
this.failoverThreshold = failoverThreshold;
return this;
}
@CustomType.Setter
public Builder regionPriorities(@Nullable Map regionPriorities) {
this.regionPriorities = regionPriorities;
return this;
}
@CustomType.Setter
public Builder targetPort(Integer targetPort) {
if (targetPort == null) {
throw new MissingRequiredPropertyException("LoadBalancerGlbSettings", "targetPort");
}
this.targetPort = targetPort;
return this;
}
@CustomType.Setter
public Builder targetProtocol(String targetProtocol) {
if (targetProtocol == null) {
throw new MissingRequiredPropertyException("LoadBalancerGlbSettings", "targetProtocol");
}
this.targetProtocol = targetProtocol;
return this;
}
public LoadBalancerGlbSettings build() {
final var _resultValue = new LoadBalancerGlbSettings();
_resultValue.cdn = cdn;
_resultValue.failoverThreshold = failoverThreshold;
_resultValue.regionPriorities = regionPriorities;
_resultValue.targetPort = targetPort;
_resultValue.targetProtocol = targetProtocol;
return _resultValue;
}
}
}