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

com.pulumi.azurenative.app.outputs.CircuitBreakerPolicyResponse Maven / Gradle / Ivy

// *** 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.app.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CircuitBreakerPolicyResponse {
    /**
     * @return Number of consecutive errors before the circuit breaker opens
     * 
     */
    private @Nullable Integer consecutiveErrors;
    /**
     * @return The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s.
     * 
     */
    private @Nullable Integer intervalInSeconds;
    /**
     * @return Maximum percentage of hosts that will be ejected after failure threshold has been met
     * 
     */
    private @Nullable Integer maxEjectionPercent;

    private CircuitBreakerPolicyResponse() {}
    /**
     * @return Number of consecutive errors before the circuit breaker opens
     * 
     */
    public Optional consecutiveErrors() {
        return Optional.ofNullable(this.consecutiveErrors);
    }
    /**
     * @return The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s.
     * 
     */
    public Optional intervalInSeconds() {
        return Optional.ofNullable(this.intervalInSeconds);
    }
    /**
     * @return Maximum percentage of hosts that will be ejected after failure threshold has been met
     * 
     */
    public Optional maxEjectionPercent() {
        return Optional.ofNullable(this.maxEjectionPercent);
    }

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

    public static Builder builder(CircuitBreakerPolicyResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Integer consecutiveErrors;
        private @Nullable Integer intervalInSeconds;
        private @Nullable Integer maxEjectionPercent;
        public Builder() {}
        public Builder(CircuitBreakerPolicyResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.consecutiveErrors = defaults.consecutiveErrors;
    	      this.intervalInSeconds = defaults.intervalInSeconds;
    	      this.maxEjectionPercent = defaults.maxEjectionPercent;
        }

        @CustomType.Setter
        public Builder consecutiveErrors(@Nullable Integer consecutiveErrors) {

            this.consecutiveErrors = consecutiveErrors;
            return this;
        }
        @CustomType.Setter
        public Builder intervalInSeconds(@Nullable Integer intervalInSeconds) {

            this.intervalInSeconds = intervalInSeconds;
            return this;
        }
        @CustomType.Setter
        public Builder maxEjectionPercent(@Nullable Integer maxEjectionPercent) {

            this.maxEjectionPercent = maxEjectionPercent;
            return this;
        }
        public CircuitBreakerPolicyResponse build() {
            final var _resultValue = new CircuitBreakerPolicyResponse();
            _resultValue.consecutiveErrors = consecutiveErrors;
            _resultValue.intervalInSeconds = intervalInSeconds;
            _resultValue.maxEjectionPercent = maxEjectionPercent;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy