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

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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final TargetHttpProxyArgs Empty = new TargetHttpProxyArgs();

    /**
     * An optional description of this resource.
     * 
     */
    @Import(name="description")
    private @Nullable Output<String> description;

    /**
     * @return An optional description of this resource.
     * 
     */
    public Optional<Output<String>> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Specifies how long to keep a connection open, after completing a response,
     * while there is no matching traffic (in seconds). If an HTTP keepalive is
     * not specified, a default value (610 seconds) will be used. For Global
     * external HTTP(S) load balancer, the minimum allowed value is 5 seconds and
     * the maximum allowed value is 1200 seconds. For Global external HTTP(S)
     * load balancer (classic), this option is not available publicly.
     * 
     */
    @Import(name="httpKeepAliveTimeoutSec")
    private @Nullable Output<Integer> httpKeepAliveTimeoutSec;

    /**
     * @return Specifies how long to keep a connection open, after completing a response,
     * while there is no matching traffic (in seconds). If an HTTP keepalive is
     * not specified, a default value (610 seconds) will be used. For Global
     * external HTTP(S) load balancer, the minimum allowed value is 5 seconds and
     * the maximum allowed value is 1200 seconds. For Global external HTTP(S)
     * load balancer (classic), this option is not available publicly.
     * 
     */
    public Optional<Output<Integer>> httpKeepAliveTimeoutSec() {
        return Optional.ofNullable(this.httpKeepAliveTimeoutSec);
    }

    /**
     * Name of the resource. Provided by the client when the resource is
     * created. The name must be 1-63 characters long, and comply with
     * RFC1035. Specifically, the name must be 1-63 characters long and match
     * the regular expression `a-z?` which means the
     * first character must be a lowercase letter, and all following
     * characters must be a dash, lowercase letter, or digit, except the last
     * character, which cannot be a dash.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Name of the resource. Provided by the client when the resource is
     * created. The name must be 1-63 characters long, and comply with
     * RFC1035. Specifically, the name must be 1-63 characters long and match
     * the regular expression `a-z?` which means the
     * first character must be a lowercase letter, and all following
     * characters must be a dash, lowercase letter, or digit, except the last
     * character, which cannot be a dash.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Import(name="project")
    private @Nullable Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Optional<Output<String>> project() {
        return Optional.ofNullable(this.project);
    }

    /**
     * This field only applies when the forwarding rule that references
     * this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED.
     * 
     */
    @Import(name="proxyBind")
    private @Nullable Output<Boolean> proxyBind;

    /**
     * @return This field only applies when the forwarding rule that references
     * this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED.
     * 
     */
    public Optional<Output<Boolean>> proxyBind() {
        return Optional.ofNullable(this.proxyBind);
    }

    /**
     * A reference to the UrlMap resource that defines the mapping from URL
     * to the BackendService.
     * 
     * ***
     * 
     */
    @Import(name="urlMap", required=true)
    private Output<String> urlMap;

    /**
     * @return A reference to the UrlMap resource that defines the mapping from URL
     * to the BackendService.
     * 
     * ***
     * 
     */
    public Output<String> urlMap() {
        return this.urlMap;
    }

    private TargetHttpProxyArgs() {}

    private TargetHttpProxyArgs(TargetHttpProxyArgs $) {
        this.description = $.description;
        this.httpKeepAliveTimeoutSec = $.httpKeepAliveTimeoutSec;
        this.name = $.name;
        this.project = $.project;
        this.proxyBind = $.proxyBind;
        this.urlMap = $.urlMap;
    }

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

    public static final class Builder {
        private TargetHttpProxyArgs $;

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

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

        /**
         * @param description An optional description of this resource.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output<String> description) {
            $.description = description;
            return this;
        }

        /**
         * @param description An optional description of this resource.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param httpKeepAliveTimeoutSec Specifies how long to keep a connection open, after completing a response,
         * while there is no matching traffic (in seconds). If an HTTP keepalive is
         * not specified, a default value (610 seconds) will be used. For Global
         * external HTTP(S) load balancer, the minimum allowed value is 5 seconds and
         * the maximum allowed value is 1200 seconds. For Global external HTTP(S)
         * load balancer (classic), this option is not available publicly.
         * 
         * @return builder
         * 
         */
        public Builder httpKeepAliveTimeoutSec(@Nullable Output<Integer> httpKeepAliveTimeoutSec) {
            $.httpKeepAliveTimeoutSec = httpKeepAliveTimeoutSec;
            return this;
        }

        /**
         * @param httpKeepAliveTimeoutSec Specifies how long to keep a connection open, after completing a response,
         * while there is no matching traffic (in seconds). If an HTTP keepalive is
         * not specified, a default value (610 seconds) will be used. For Global
         * external HTTP(S) load balancer, the minimum allowed value is 5 seconds and
         * the maximum allowed value is 1200 seconds. For Global external HTTP(S)
         * load balancer (classic), this option is not available publicly.
         * 
         * @return builder
         * 
         */
        public Builder httpKeepAliveTimeoutSec(Integer httpKeepAliveTimeoutSec) {
            return httpKeepAliveTimeoutSec(Output.of(httpKeepAliveTimeoutSec));
        }

        /**
         * @param name Name of the resource. Provided by the client when the resource is
         * created. The name must be 1-63 characters long, and comply with
         * RFC1035. Specifically, the name must be 1-63 characters long and match
         * the regular expression `a-z?` which means the
         * first character must be a lowercase letter, and all following
         * characters must be a dash, lowercase letter, or digit, except the last
         * character, which cannot be a dash.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the resource. Provided by the client when the resource is
         * created. The name must be 1-63 characters long, and comply with
         * RFC1035. Specifically, the name must be 1-63 characters long and match
         * the regular expression `a-z?` which means the
         * first character must be a lowercase letter, and all following
         * characters must be a dash, lowercase letter, or digit, except the last
         * character, which cannot be a dash.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param project The ID of the project in which the resource belongs.
         * If it is not provided, the provider project is used.
         * 
         * @return builder
         * 
         */
        public Builder project(@Nullable Output<String> project) {
            $.project = project;
            return this;
        }

        /**
         * @param project The ID of the project in which the resource belongs.
         * If it is not provided, the provider project is used.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param proxyBind This field only applies when the forwarding rule that references
         * this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED.
         * 
         * @return builder
         * 
         */
        public Builder proxyBind(@Nullable Output<Boolean> proxyBind) {
            $.proxyBind = proxyBind;
            return this;
        }

        /**
         * @param proxyBind This field only applies when the forwarding rule that references
         * this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED.
         * 
         * @return builder
         * 
         */
        public Builder proxyBind(Boolean proxyBind) {
            return proxyBind(Output.of(proxyBind));
        }

        /**
         * @param urlMap A reference to the UrlMap resource that defines the mapping from URL
         * to the BackendService.
         * 
         * ***
         * 
         * @return builder
         * 
         */
        public Builder urlMap(Output<String> urlMap) {
            $.urlMap = urlMap;
            return this;
        }

        /**
         * @param urlMap A reference to the UrlMap resource that defines the mapping from URL
         * to the BackendService.
         * 
         * ***
         * 
         * @return builder
         * 
         */
        public Builder urlMap(String urlMap) {
            return urlMap(Output.of(urlMap));
        }

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

}
