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

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

@CustomType
public final class ManagedClusterLbRule {
    /**
     * @return LB Backend port.
     * 
     */
    private Integer backendPort;
    /**
     * @return LB Frontend port.
     * 
     */
    private Integer frontendPort;
    /**
     * @return Protocol for the probe. Can be one of `tcp`, `udp`, `http`, or `https`.
     * 
     */
    private String probeProtocol;
    /**
     * @return Path for the probe to check, when probe protocol is set to `http`.
     * 
     */
    private @Nullable String probeRequestPath;
    /**
     * @return The transport protocol used in this rule. Can be one of `tcp` or `udp`.
     * 
     */
    private String protocol;

    private ManagedClusterLbRule() {}
    /**
     * @return LB Backend port.
     * 
     */
    public Integer backendPort() {
        return this.backendPort;
    }
    /**
     * @return LB Frontend port.
     * 
     */
    public Integer frontendPort() {
        return this.frontendPort;
    }
    /**
     * @return Protocol for the probe. Can be one of `tcp`, `udp`, `http`, or `https`.
     * 
     */
    public String probeProtocol() {
        return this.probeProtocol;
    }
    /**
     * @return Path for the probe to check, when probe protocol is set to `http`.
     * 
     */
    public Optional<String> probeRequestPath() {
        return Optional.ofNullable(this.probeRequestPath);
    }
    /**
     * @return The transport protocol used in this rule. Can be one of `tcp` or `udp`.
     * 
     */
    public String protocol() {
        return this.protocol;
    }

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

    public static Builder builder(ManagedClusterLbRule defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private Integer backendPort;
        private Integer frontendPort;
        private String probeProtocol;
        private @Nullable String probeRequestPath;
        private String protocol;
        public Builder() {}
        public Builder(ManagedClusterLbRule defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.backendPort = defaults.backendPort;
    	      this.frontendPort = defaults.frontendPort;
    	      this.probeProtocol = defaults.probeProtocol;
    	      this.probeRequestPath = defaults.probeRequestPath;
    	      this.protocol = defaults.protocol;
        }

        @CustomType.Setter
        public Builder backendPort(Integer backendPort) {
            this.backendPort = Objects.requireNonNull(backendPort);
            return this;
        }
        @CustomType.Setter
        public Builder frontendPort(Integer frontendPort) {
            this.frontendPort = Objects.requireNonNull(frontendPort);
            return this;
        }
        @CustomType.Setter
        public Builder probeProtocol(String probeProtocol) {
            this.probeProtocol = Objects.requireNonNull(probeProtocol);
            return this;
        }
        @CustomType.Setter
        public Builder probeRequestPath(@Nullable String probeRequestPath) {
            this.probeRequestPath = probeRequestPath;
            return this;
        }
        @CustomType.Setter
        public Builder protocol(String protocol) {
            this.protocol = Objects.requireNonNull(protocol);
            return this;
        }
        public ManagedClusterLbRule build() {
            final var o = new ManagedClusterLbRule();
            o.backendPort = backendPort;
            o.frontendPort = frontendPort;
            o.probeProtocol = probeProtocol;
            o.probeRequestPath = probeRequestPath;
            o.protocol = protocol;
            return o;
        }
    }
}
