// *** 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.azure.servicefabric.inputs;

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


public final class ClusterUpgradePolicyHealthPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final ClusterUpgradePolicyHealthPolicyArgs Empty = new ClusterUpgradePolicyHealthPolicyArgs();

    /**
     * Specifies the maximum tolerated percentage of applications that can have aggregated health state of error. If the upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`.
     * 
     */
    @Import(name="maxUnhealthyApplicationsPercent")
    private @Nullable Output<Integer> maxUnhealthyApplicationsPercent;

    /**
     * @return Specifies the maximum tolerated percentage of applications that can have aggregated health state of error. If the upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`.
     * 
     */
    public Optional<Output<Integer>> maxUnhealthyApplicationsPercent() {
        return Optional.ofNullable(this.maxUnhealthyApplicationsPercent);
    }

    /**
     * Specifies the maximum tolerated percentage of nodes that can have aggregated health states of error. If an upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`.
     * 
     */
    @Import(name="maxUnhealthyNodesPercent")
    private @Nullable Output<Integer> maxUnhealthyNodesPercent;

    /**
     * @return Specifies the maximum tolerated percentage of nodes that can have aggregated health states of error. If an upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`.
     * 
     */
    public Optional<Output<Integer>> maxUnhealthyNodesPercent() {
        return Optional.ofNullable(this.maxUnhealthyNodesPercent);
    }

    private ClusterUpgradePolicyHealthPolicyArgs() {}

    private ClusterUpgradePolicyHealthPolicyArgs(ClusterUpgradePolicyHealthPolicyArgs $) {
        this.maxUnhealthyApplicationsPercent = $.maxUnhealthyApplicationsPercent;
        this.maxUnhealthyNodesPercent = $.maxUnhealthyNodesPercent;
    }

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

    public static final class Builder {
        private ClusterUpgradePolicyHealthPolicyArgs $;

        public Builder() {
            $ = new ClusterUpgradePolicyHealthPolicyArgs();
        }

        public Builder(ClusterUpgradePolicyHealthPolicyArgs defaults) {
            $ = new ClusterUpgradePolicyHealthPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param maxUnhealthyApplicationsPercent Specifies the maximum tolerated percentage of applications that can have aggregated health state of error. If the upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder maxUnhealthyApplicationsPercent(@Nullable Output<Integer> maxUnhealthyApplicationsPercent) {
            $.maxUnhealthyApplicationsPercent = maxUnhealthyApplicationsPercent;
            return this;
        }

        /**
         * @param maxUnhealthyApplicationsPercent Specifies the maximum tolerated percentage of applications that can have aggregated health state of error. If the upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder maxUnhealthyApplicationsPercent(Integer maxUnhealthyApplicationsPercent) {
            return maxUnhealthyApplicationsPercent(Output.of(maxUnhealthyApplicationsPercent));
        }

        /**
         * @param maxUnhealthyNodesPercent Specifies the maximum tolerated percentage of nodes that can have aggregated health states of error. If an upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder maxUnhealthyNodesPercent(@Nullable Output<Integer> maxUnhealthyNodesPercent) {
            $.maxUnhealthyNodesPercent = maxUnhealthyNodesPercent;
            return this;
        }

        /**
         * @param maxUnhealthyNodesPercent Specifies the maximum tolerated percentage of nodes that can have aggregated health states of error. If an upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder maxUnhealthyNodesPercent(Integer maxUnhealthyNodesPercent) {
            return maxUnhealthyNodesPercent(Output.of(maxUnhealthyNodesPercent));
        }

        public ClusterUpgradePolicyHealthPolicyArgs build() {
            return $;
        }
    }

}
