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

import com.pulumi.core.Either;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.core.v1.outputs.HTTPHeader;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class HTTPGetAction {
    /**
     * @return Host name to connect to, defaults to the pod IP. You probably want to set &#34;Host&#34; in httpHeaders instead.
     * 
     */
    private @Nullable String host;
    /**
     * @return Custom headers to set in the request. HTTP allows repeated headers.
     * 
     */
    private @Nullable List<HTTPHeader> httpHeaders;
    /**
     * @return Path to access on the HTTP server.
     * 
     */
    private @Nullable String path;
    /**
     * @return Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
     * 
     */
    private Either<Integer,String> port;
    /**
     * @return Scheme to use for connecting to the host. Defaults to HTTP.
     * 
     */
    private @Nullable String scheme;

    private HTTPGetAction() {}
    /**
     * @return Host name to connect to, defaults to the pod IP. You probably want to set &#34;Host&#34; in httpHeaders instead.
     * 
     */
    public Optional<String> host() {
        return Optional.ofNullable(this.host);
    }
    /**
     * @return Custom headers to set in the request. HTTP allows repeated headers.
     * 
     */
    public List<HTTPHeader> httpHeaders() {
        return this.httpHeaders == null ? List.of() : this.httpHeaders;
    }
    /**
     * @return Path to access on the HTTP server.
     * 
     */
    public Optional<String> path() {
        return Optional.ofNullable(this.path);
    }
    /**
     * @return Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
     * 
     */
    public Either<Integer,String> port() {
        return this.port;
    }
    /**
     * @return Scheme to use for connecting to the host. Defaults to HTTP.
     * 
     */
    public Optional<String> scheme() {
        return Optional.ofNullable(this.scheme);
    }

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

    public static Builder builder(HTTPGetAction defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String host;
        private @Nullable List<HTTPHeader> httpHeaders;
        private @Nullable String path;
        private Either<Integer,String> port;
        private @Nullable String scheme;
        public Builder() {}
        public Builder(HTTPGetAction defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.host = defaults.host;
    	      this.httpHeaders = defaults.httpHeaders;
    	      this.path = defaults.path;
    	      this.port = defaults.port;
    	      this.scheme = defaults.scheme;
        }

        @CustomType.Setter
        public Builder host(@Nullable String host) {
            this.host = host;
            return this;
        }
        @CustomType.Setter
        public Builder httpHeaders(@Nullable List<HTTPHeader> httpHeaders) {
            this.httpHeaders = httpHeaders;
            return this;
        }
        public Builder httpHeaders(HTTPHeader... httpHeaders) {
            return httpHeaders(List.of(httpHeaders));
        }
        @CustomType.Setter
        public Builder path(@Nullable String path) {
            this.path = path;
            return this;
        }
        @CustomType.Setter
        public Builder port(Either<Integer,String> port) {
            this.port = Objects.requireNonNull(port);
            return this;
        }
        @CustomType.Setter
        public Builder scheme(@Nullable String scheme) {
            this.scheme = scheme;
            return this;
        }
        public HTTPGetAction build() {
            final var o = new HTTPGetAction();
            o.host = host;
            o.httpHeaders = httpHeaders;
            o.path = path;
            o.port = port;
            o.scheme = scheme;
            return o;
        }
    }
}
