com.pulumi.azurenative.documentdb.outputs.FailoverPolicyResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
The 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.azurenative.documentdb.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class FailoverPolicyResponse {
/**
* @return The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
*
*/
private @Nullable Integer failoverPriority;
/**
* @return The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>.
*
*/
private String id;
/**
* @return The name of the region in which the database account exists.
*
*/
private @Nullable String locationName;
private FailoverPolicyResponse() {}
/**
* @return The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
*
*/
public Optional failoverPriority() {
return Optional.ofNullable(this.failoverPriority);
}
/**
* @return The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>.
*
*/
public String id() {
return this.id;
}
/**
* @return The name of the region in which the database account exists.
*
*/
public Optional locationName() {
return Optional.ofNullable(this.locationName);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(FailoverPolicyResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer failoverPriority;
private String id;
private @Nullable String locationName;
public Builder() {}
public Builder(FailoverPolicyResponse defaults) {
Objects.requireNonNull(defaults);
this.failoverPriority = defaults.failoverPriority;
this.id = defaults.id;
this.locationName = defaults.locationName;
}
@CustomType.Setter
public Builder failoverPriority(@Nullable Integer failoverPriority) {
this.failoverPriority = failoverPriority;
return this;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("FailoverPolicyResponse", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder locationName(@Nullable String locationName) {
this.locationName = locationName;
return this;
}
public FailoverPolicyResponse build() {
final var _resultValue = new FailoverPolicyResponse();
_resultValue.failoverPriority = failoverPriority;
_resultValue.id = id;
_resultValue.locationName = locationName;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy