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

com.pulumi.azurenative.servicefabric.outputs.ApplicationHealthPolicyResponse 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.servicefabric.outputs;

import com.pulumi.azurenative.servicefabric.outputs.ServiceTypeHealthPolicyResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
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 ApplicationHealthPolicyResponse {
    /**
     * @return Indicates whether warnings are treated with the same severity as errors.
     * 
     */
    private Boolean considerWarningAsError;
    /**
     * @return The health policy used by default to evaluate the health of a service type.
     * 
     */
    private @Nullable ServiceTypeHealthPolicyResponse defaultServiceTypeHealthPolicy;
    /**
     * @return The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100.
     * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error.
     * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster.
     * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.
     * 
     */
    private Integer maxPercentUnhealthyDeployedApplications;
    /**
     * @return The map with service type health policy per service type name. The map is empty by default.
     * 
     */
    private @Nullable Map serviceTypeHealthPolicyMap;

    private ApplicationHealthPolicyResponse() {}
    /**
     * @return Indicates whether warnings are treated with the same severity as errors.
     * 
     */
    public Boolean considerWarningAsError() {
        return this.considerWarningAsError;
    }
    /**
     * @return The health policy used by default to evaluate the health of a service type.
     * 
     */
    public Optional defaultServiceTypeHealthPolicy() {
        return Optional.ofNullable(this.defaultServiceTypeHealthPolicy);
    }
    /**
     * @return The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100.
     * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error.
     * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster.
     * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.
     * 
     */
    public Integer maxPercentUnhealthyDeployedApplications() {
        return this.maxPercentUnhealthyDeployedApplications;
    }
    /**
     * @return The map with service type health policy per service type name. The map is empty by default.
     * 
     */
    public Map serviceTypeHealthPolicyMap() {
        return this.serviceTypeHealthPolicyMap == null ? Map.of() : this.serviceTypeHealthPolicyMap;
    }

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

    public static Builder builder(ApplicationHealthPolicyResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private Boolean considerWarningAsError;
        private @Nullable ServiceTypeHealthPolicyResponse defaultServiceTypeHealthPolicy;
        private Integer maxPercentUnhealthyDeployedApplications;
        private @Nullable Map serviceTypeHealthPolicyMap;
        public Builder() {}
        public Builder(ApplicationHealthPolicyResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.considerWarningAsError = defaults.considerWarningAsError;
    	      this.defaultServiceTypeHealthPolicy = defaults.defaultServiceTypeHealthPolicy;
    	      this.maxPercentUnhealthyDeployedApplications = defaults.maxPercentUnhealthyDeployedApplications;
    	      this.serviceTypeHealthPolicyMap = defaults.serviceTypeHealthPolicyMap;
        }

        @CustomType.Setter
        public Builder considerWarningAsError(Boolean considerWarningAsError) {
            if (considerWarningAsError == null) {
              throw new MissingRequiredPropertyException("ApplicationHealthPolicyResponse", "considerWarningAsError");
            }
            this.considerWarningAsError = considerWarningAsError;
            return this;
        }
        @CustomType.Setter
        public Builder defaultServiceTypeHealthPolicy(@Nullable ServiceTypeHealthPolicyResponse defaultServiceTypeHealthPolicy) {

            this.defaultServiceTypeHealthPolicy = defaultServiceTypeHealthPolicy;
            return this;
        }
        @CustomType.Setter
        public Builder maxPercentUnhealthyDeployedApplications(Integer maxPercentUnhealthyDeployedApplications) {
            if (maxPercentUnhealthyDeployedApplications == null) {
              throw new MissingRequiredPropertyException("ApplicationHealthPolicyResponse", "maxPercentUnhealthyDeployedApplications");
            }
            this.maxPercentUnhealthyDeployedApplications = maxPercentUnhealthyDeployedApplications;
            return this;
        }
        @CustomType.Setter
        public Builder serviceTypeHealthPolicyMap(@Nullable Map serviceTypeHealthPolicyMap) {

            this.serviceTypeHealthPolicyMap = serviceTypeHealthPolicyMap;
            return this;
        }
        public ApplicationHealthPolicyResponse build() {
            final var _resultValue = new ApplicationHealthPolicyResponse();
            _resultValue.considerWarningAsError = considerWarningAsError;
            _resultValue.defaultServiceTypeHealthPolicy = defaultServiceTypeHealthPolicy;
            _resultValue.maxPercentUnhealthyDeployedApplications = maxPercentUnhealthyDeployedApplications;
            _resultValue.serviceTypeHealthPolicyMap = serviceTypeHealthPolicyMap;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy