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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.cloudscheduler.inputs.JobAppEngineHttpTargetAppEngineRoutingArgs;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final JobAppEngineHttpTargetArgs Empty = new JobAppEngineHttpTargetArgs();

    /**
     * App Engine Routing setting for the job.
     * Structure is documented below.
     * 
     */
    @Import(name="appEngineRouting")
    private @Nullable Output<JobAppEngineHttpTargetAppEngineRoutingArgs> appEngineRouting;

    /**
     * @return App Engine Routing setting for the job.
     * Structure is documented below.
     * 
     */
    public Optional<Output<JobAppEngineHttpTargetAppEngineRoutingArgs>> appEngineRouting() {
        return Optional.ofNullable(this.appEngineRouting);
    }

    /**
     * HTTP request body.
     * A request body is allowed only if the HTTP method is POST or PUT.
     * It will result in invalid argument error to set a body on a job with an incompatible HttpMethod.
     * A base64-encoded string.
     * 
     */
    @Import(name="body")
    private @Nullable Output<String> body;

    /**
     * @return HTTP request body.
     * A request body is allowed only if the HTTP method is POST or PUT.
     * It will result in invalid argument error to set a body on a job with an incompatible HttpMethod.
     * A base64-encoded string.
     * 
     */
    public Optional<Output<String>> body() {
        return Optional.ofNullable(this.body);
    }

    /**
     * HTTP request headers.
     * This map contains the header field names and values.
     * Headers can be set when the job is created.
     * 
     */
    @Import(name="headers")
    private @Nullable Output<Map<String,String>> headers;

    /**
     * @return HTTP request headers.
     * This map contains the header field names and values.
     * Headers can be set when the job is created.
     * 
     */
    public Optional<Output<Map<String,String>>> headers() {
        return Optional.ofNullable(this.headers);
    }

    /**
     * Which HTTP method to use for the request.
     * 
     */
    @Import(name="httpMethod")
    private @Nullable Output<String> httpMethod;

    /**
     * @return Which HTTP method to use for the request.
     * 
     */
    public Optional<Output<String>> httpMethod() {
        return Optional.ofNullable(this.httpMethod);
    }

    /**
     * The relative URI.
     * The relative URL must begin with &#34;/&#34; and must be a valid HTTP relative URL.
     * It can contain a path, query string arguments, and \# fragments.
     * If the relative URL is empty, then the root path &#34;/&#34; will be used.
     * No spaces are allowed, and the maximum length allowed is 2083 characters
     * 
     */
    @Import(name="relativeUri", required=true)
    private Output<String> relativeUri;

    /**
     * @return The relative URI.
     * The relative URL must begin with &#34;/&#34; and must be a valid HTTP relative URL.
     * It can contain a path, query string arguments, and \# fragments.
     * If the relative URL is empty, then the root path &#34;/&#34; will be used.
     * No spaces are allowed, and the maximum length allowed is 2083 characters
     * 
     */
    public Output<String> relativeUri() {
        return this.relativeUri;
    }

    private JobAppEngineHttpTargetArgs() {}

    private JobAppEngineHttpTargetArgs(JobAppEngineHttpTargetArgs $) {
        this.appEngineRouting = $.appEngineRouting;
        this.body = $.body;
        this.headers = $.headers;
        this.httpMethod = $.httpMethod;
        this.relativeUri = $.relativeUri;
    }

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

    public static final class Builder {
        private JobAppEngineHttpTargetArgs $;

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

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

        /**
         * @param appEngineRouting App Engine Routing setting for the job.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder appEngineRouting(@Nullable Output<JobAppEngineHttpTargetAppEngineRoutingArgs> appEngineRouting) {
            $.appEngineRouting = appEngineRouting;
            return this;
        }

        /**
         * @param appEngineRouting App Engine Routing setting for the job.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder appEngineRouting(JobAppEngineHttpTargetAppEngineRoutingArgs appEngineRouting) {
            return appEngineRouting(Output.of(appEngineRouting));
        }

        /**
         * @param body HTTP request body.
         * A request body is allowed only if the HTTP method is POST or PUT.
         * It will result in invalid argument error to set a body on a job with an incompatible HttpMethod.
         * A base64-encoded string.
         * 
         * @return builder
         * 
         */
        public Builder body(@Nullable Output<String> body) {
            $.body = body;
            return this;
        }

        /**
         * @param body HTTP request body.
         * A request body is allowed only if the HTTP method is POST or PUT.
         * It will result in invalid argument error to set a body on a job with an incompatible HttpMethod.
         * A base64-encoded string.
         * 
         * @return builder
         * 
         */
        public Builder body(String body) {
            return body(Output.of(body));
        }

        /**
         * @param headers HTTP request headers.
         * This map contains the header field names and values.
         * Headers can be set when the job is created.
         * 
         * @return builder
         * 
         */
        public Builder headers(@Nullable Output<Map<String,String>> headers) {
            $.headers = headers;
            return this;
        }

        /**
         * @param headers HTTP request headers.
         * This map contains the header field names and values.
         * Headers can be set when the job is created.
         * 
         * @return builder
         * 
         */
        public Builder headers(Map<String,String> headers) {
            return headers(Output.of(headers));
        }

        /**
         * @param httpMethod Which HTTP method to use for the request.
         * 
         * @return builder
         * 
         */
        public Builder httpMethod(@Nullable Output<String> httpMethod) {
            $.httpMethod = httpMethod;
            return this;
        }

        /**
         * @param httpMethod Which HTTP method to use for the request.
         * 
         * @return builder
         * 
         */
        public Builder httpMethod(String httpMethod) {
            return httpMethod(Output.of(httpMethod));
        }

        /**
         * @param relativeUri The relative URI.
         * The relative URL must begin with &#34;/&#34; and must be a valid HTTP relative URL.
         * It can contain a path, query string arguments, and \# fragments.
         * If the relative URL is empty, then the root path &#34;/&#34; will be used.
         * No spaces are allowed, and the maximum length allowed is 2083 characters
         * 
         * @return builder
         * 
         */
        public Builder relativeUri(Output<String> relativeUri) {
            $.relativeUri = relativeUri;
            return this;
        }

        /**
         * @param relativeUri The relative URI.
         * The relative URL must begin with &#34;/&#34; and must be a valid HTTP relative URL.
         * It can contain a path, query string arguments, and \# fragments.
         * If the relative URL is empty, then the root path &#34;/&#34; will be used.
         * No spaces are allowed, and the maximum length allowed is 2083 characters
         * 
         * @return builder
         * 
         */
        public Builder relativeUri(String relativeUri) {
            return relativeUri(Output.of(relativeUri));
        }

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

}
