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

com.pulumi.azurenative.sql.outputs.FailoverGroupReadWriteEndpointResponse Maven / Gradle / Ivy

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.sql.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 FailoverGroupReadWriteEndpointResponse {
    /**
     * @return Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
     * 
     */
    private String failoverPolicy;
    /**
     * @return Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
     * 
     */
    private @Nullable Integer failoverWithDataLossGracePeriodMinutes;

    private FailoverGroupReadWriteEndpointResponse() {}
    /**
     * @return Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
     * 
     */
    public String failoverPolicy() {
        return this.failoverPolicy;
    }
    /**
     * @return Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
     * 
     */
    public Optional failoverWithDataLossGracePeriodMinutes() {
        return Optional.ofNullable(this.failoverWithDataLossGracePeriodMinutes);
    }

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

    public static Builder builder(FailoverGroupReadWriteEndpointResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String failoverPolicy;
        private @Nullable Integer failoverWithDataLossGracePeriodMinutes;
        public Builder() {}
        public Builder(FailoverGroupReadWriteEndpointResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.failoverPolicy = defaults.failoverPolicy;
    	      this.failoverWithDataLossGracePeriodMinutes = defaults.failoverWithDataLossGracePeriodMinutes;
        }

        @CustomType.Setter
        public Builder failoverPolicy(String failoverPolicy) {
            if (failoverPolicy == null) {
              throw new MissingRequiredPropertyException("FailoverGroupReadWriteEndpointResponse", "failoverPolicy");
            }
            this.failoverPolicy = failoverPolicy;
            return this;
        }
        @CustomType.Setter
        public Builder failoverWithDataLossGracePeriodMinutes(@Nullable Integer failoverWithDataLossGracePeriodMinutes) {

            this.failoverWithDataLossGracePeriodMinutes = failoverWithDataLossGracePeriodMinutes;
            return this;
        }
        public FailoverGroupReadWriteEndpointResponse build() {
            final var _resultValue = new FailoverGroupReadWriteEndpointResponse();
            _resultValue.failoverPolicy = failoverPolicy;
            _resultValue.failoverWithDataLossGracePeriodMinutes = failoverWithDataLossGracePeriodMinutes;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy