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

import com.pulumi.azure.containerapp.inputs.AppIngressCustomDomainArgs;
import com.pulumi.azure.containerapp.inputs.AppIngressTrafficWeightArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AppIngressArgs Empty = new AppIngressArgs();

    /**
     * Should this ingress allow insecure connections?
     * 
     */
    @Import(name="allowInsecureConnections")
    private @Nullable Output<Boolean> allowInsecureConnections;

    /**
     * @return Should this ingress allow insecure connections?
     * 
     */
    public Optional<Output<Boolean>> allowInsecureConnections() {
        return Optional.ofNullable(this.allowInsecureConnections);
    }

    /**
     * One or more `custom_domain` block as detailed below.
     * 
     */
    @Import(name="customDomain")
    private @Nullable Output<AppIngressCustomDomainArgs> customDomain;

    /**
     * @return One or more `custom_domain` block as detailed below.
     * 
     */
    public Optional<Output<AppIngressCustomDomainArgs>> customDomain() {
        return Optional.ofNullable(this.customDomain);
    }

    /**
     * Is this an external Ingress.
     * 
     */
    @Import(name="externalEnabled")
    private @Nullable Output<Boolean> externalEnabled;

    /**
     * @return Is this an external Ingress.
     * 
     */
    public Optional<Output<Boolean>> externalEnabled() {
        return Optional.ofNullable(this.externalEnabled);
    }

    /**
     * The FQDN of the ingress.
     * 
     */
    @Import(name="fqdn")
    private @Nullable Output<String> fqdn;

    /**
     * @return The FQDN of the ingress.
     * 
     */
    public Optional<Output<String>> fqdn() {
        return Optional.ofNullable(this.fqdn);
    }

    /**
     * The target port on the container for the Ingress traffic.
     * 
     */
    @Import(name="targetPort", required=true)
    private Output<Integer> targetPort;

    /**
     * @return The target port on the container for the Ingress traffic.
     * 
     */
    public Output<Integer> targetPort() {
        return this.targetPort;
    }

    /**
     * A `traffic_weight` block as detailed below.
     * 
     * &gt; **Note:** `traffic_weight` can only be specified when `revision_mode` is set to `Multiple`.
     * 
     */
    @Import(name="trafficWeights", required=true)
    private Output<List<AppIngressTrafficWeightArgs>> trafficWeights;

    /**
     * @return A `traffic_weight` block as detailed below.
     * 
     * &gt; **Note:** `traffic_weight` can only be specified when `revision_mode` is set to `Multiple`.
     * 
     */
    public Output<List<AppIngressTrafficWeightArgs>> trafficWeights() {
        return this.trafficWeights;
    }

    /**
     * The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`. Defaults to `auto`
     * 
     */
    @Import(name="transport")
    private @Nullable Output<String> transport;

    /**
     * @return The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`. Defaults to `auto`
     * 
     */
    public Optional<Output<String>> transport() {
        return Optional.ofNullable(this.transport);
    }

    private AppIngressArgs() {}

    private AppIngressArgs(AppIngressArgs $) {
        this.allowInsecureConnections = $.allowInsecureConnections;
        this.customDomain = $.customDomain;
        this.externalEnabled = $.externalEnabled;
        this.fqdn = $.fqdn;
        this.targetPort = $.targetPort;
        this.trafficWeights = $.trafficWeights;
        this.transport = $.transport;
    }

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

    public static final class Builder {
        private AppIngressArgs $;

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

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

        /**
         * @param allowInsecureConnections Should this ingress allow insecure connections?
         * 
         * @return builder
         * 
         */
        public Builder allowInsecureConnections(@Nullable Output<Boolean> allowInsecureConnections) {
            $.allowInsecureConnections = allowInsecureConnections;
            return this;
        }

        /**
         * @param allowInsecureConnections Should this ingress allow insecure connections?
         * 
         * @return builder
         * 
         */
        public Builder allowInsecureConnections(Boolean allowInsecureConnections) {
            return allowInsecureConnections(Output.of(allowInsecureConnections));
        }

        /**
         * @param customDomain One or more `custom_domain` block as detailed below.
         * 
         * @return builder
         * 
         */
        public Builder customDomain(@Nullable Output<AppIngressCustomDomainArgs> customDomain) {
            $.customDomain = customDomain;
            return this;
        }

        /**
         * @param customDomain One or more `custom_domain` block as detailed below.
         * 
         * @return builder
         * 
         */
        public Builder customDomain(AppIngressCustomDomainArgs customDomain) {
            return customDomain(Output.of(customDomain));
        }

        /**
         * @param externalEnabled Is this an external Ingress.
         * 
         * @return builder
         * 
         */
        public Builder externalEnabled(@Nullable Output<Boolean> externalEnabled) {
            $.externalEnabled = externalEnabled;
            return this;
        }

        /**
         * @param externalEnabled Is this an external Ingress.
         * 
         * @return builder
         * 
         */
        public Builder externalEnabled(Boolean externalEnabled) {
            return externalEnabled(Output.of(externalEnabled));
        }

        /**
         * @param fqdn The FQDN of the ingress.
         * 
         * @return builder
         * 
         */
        public Builder fqdn(@Nullable Output<String> fqdn) {
            $.fqdn = fqdn;
            return this;
        }

        /**
         * @param fqdn The FQDN of the ingress.
         * 
         * @return builder
         * 
         */
        public Builder fqdn(String fqdn) {
            return fqdn(Output.of(fqdn));
        }

        /**
         * @param targetPort The target port on the container for the Ingress traffic.
         * 
         * @return builder
         * 
         */
        public Builder targetPort(Output<Integer> targetPort) {
            $.targetPort = targetPort;
            return this;
        }

        /**
         * @param targetPort The target port on the container for the Ingress traffic.
         * 
         * @return builder
         * 
         */
        public Builder targetPort(Integer targetPort) {
            return targetPort(Output.of(targetPort));
        }

        /**
         * @param trafficWeights A `traffic_weight` block as detailed below.
         * 
         * &gt; **Note:** `traffic_weight` can only be specified when `revision_mode` is set to `Multiple`.
         * 
         * @return builder
         * 
         */
        public Builder trafficWeights(Output<List<AppIngressTrafficWeightArgs>> trafficWeights) {
            $.trafficWeights = trafficWeights;
            return this;
        }

        /**
         * @param trafficWeights A `traffic_weight` block as detailed below.
         * 
         * &gt; **Note:** `traffic_weight` can only be specified when `revision_mode` is set to `Multiple`.
         * 
         * @return builder
         * 
         */
        public Builder trafficWeights(List<AppIngressTrafficWeightArgs> trafficWeights) {
            return trafficWeights(Output.of(trafficWeights));
        }

        /**
         * @param trafficWeights A `traffic_weight` block as detailed below.
         * 
         * &gt; **Note:** `traffic_weight` can only be specified when `revision_mode` is set to `Multiple`.
         * 
         * @return builder
         * 
         */
        public Builder trafficWeights(AppIngressTrafficWeightArgs... trafficWeights) {
            return trafficWeights(List.of(trafficWeights));
        }

        /**
         * @param transport The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`. Defaults to `auto`
         * 
         * @return builder
         * 
         */
        public Builder transport(@Nullable Output<String> transport) {
            $.transport = transport;
            return this;
        }

        /**
         * @param transport The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`. Defaults to `auto`
         * 
         * @return builder
         * 
         */
        public Builder transport(String transport) {
            return transport(Output.of(transport));
        }

        public AppIngressArgs build() {
            $.targetPort = Objects.requireNonNull($.targetPort, "expected parameter 'targetPort' to be non-null");
            $.trafficWeights = Objects.requireNonNull($.trafficWeights, "expected parameter 'trafficWeights' to be non-null");
            return $;
        }
    }

}
