All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobAppEngineHttpTargetArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudscheduler.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudscheduler.inputs.JobAppEngineHttpTargetArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property appEngineRouting App Engine Routing setting for the job.
 * Structure is documented below.
 * @property 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.
 * @property headers HTTP request headers.
 * This map contains the header field names and values.
 * Headers can be set when the job is created.
 * @property httpMethod Which HTTP method to use for the request.
 * @property relativeUri The relative URI.
 * The relative URL must begin with "/" 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 "/" will be used.
 * No spaces are allowed, and the maximum length allowed is 2083 characters
 */
public data class JobAppEngineHttpTargetArgs(
    public val appEngineRouting: Output? = null,
    public val body: Output? = null,
    public val headers: Output>? = null,
    public val httpMethod: Output? = null,
    public val relativeUri: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudscheduler.inputs.JobAppEngineHttpTargetArgs =
        com.pulumi.gcp.cloudscheduler.inputs.JobAppEngineHttpTargetArgs.builder()
            .appEngineRouting(appEngineRouting?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .body(body?.applyValue({ args0 -> args0 }))
            .headers(headers?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .httpMethod(httpMethod?.applyValue({ args0 -> args0 }))
            .relativeUri(relativeUri.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [JobAppEngineHttpTargetArgs].
 */
@PulumiTagMarker
public class JobAppEngineHttpTargetArgsBuilder internal constructor() {
    private var appEngineRouting: Output? = null

    private var body: Output? = null

    private var headers: Output>? = null

    private var httpMethod: Output? = null

    private var relativeUri: Output? = null

    /**
     * @param value App Engine Routing setting for the job.
     * Structure is documented below.
     */
    @JvmName("bqxbvtgswqyykvmq")
    public suspend fun appEngineRouting(`value`: Output) {
        this.appEngineRouting = value
    }

    /**
     * @param value 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.
     */
    @JvmName("fmiwrvykgwkxervw")
    public suspend fun body(`value`: Output) {
        this.body = value
    }

    /**
     * @param value HTTP request headers.
     * This map contains the header field names and values.
     * Headers can be set when the job is created.
     */
    @JvmName("efpecjrdpaaklqop")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

    /**
     * @param value Which HTTP method to use for the request.
     */
    @JvmName("jslxlfsbgmeahlwm")
    public suspend fun httpMethod(`value`: Output) {
        this.httpMethod = value
    }

    /**
     * @param value The relative URI.
     * The relative URL must begin with "/" 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 "/" will be used.
     * No spaces are allowed, and the maximum length allowed is 2083 characters
     */
    @JvmName("evcwsrabdltlspfv")
    public suspend fun relativeUri(`value`: Output) {
        this.relativeUri = value
    }

    /**
     * @param value App Engine Routing setting for the job.
     * Structure is documented below.
     */
    @JvmName("ebytxsiynlmsremq")
    public suspend fun appEngineRouting(`value`: JobAppEngineHttpTargetAppEngineRoutingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appEngineRouting = mapped
    }

    /**
     * @param argument App Engine Routing setting for the job.
     * Structure is documented below.
     */
    @JvmName("fxtdyqncvlldvtng")
    public suspend fun appEngineRouting(argument: suspend JobAppEngineHttpTargetAppEngineRoutingArgsBuilder.() -> Unit) {
        val toBeMapped = JobAppEngineHttpTargetAppEngineRoutingArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.appEngineRouting = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("ohrnuacobbfqvjvv")
    public suspend fun body(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.body = mapped
    }

    /**
     * @param value HTTP request headers.
     * This map contains the header field names and values.
     * Headers can be set when the job is created.
     */
    @JvmName("gkawcaeeyxrffnot")
    public suspend fun headers(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param values HTTP request headers.
     * This map contains the header field names and values.
     * Headers can be set when the job is created.
     */
    @JvmName("mpnydajktlkpicyk")
    public fun headers(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value Which HTTP method to use for the request.
     */
    @JvmName("tbsqpmfwirtprfos")
    public suspend fun httpMethod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpMethod = mapped
    }

    /**
     * @param value The relative URI.
     * The relative URL must begin with "/" 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 "/" will be used.
     * No spaces are allowed, and the maximum length allowed is 2083 characters
     */
    @JvmName("xdfxlyeivlckwfoa")
    public suspend fun relativeUri(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.relativeUri = mapped
    }

    internal fun build(): JobAppEngineHttpTargetArgs = JobAppEngineHttpTargetArgs(
        appEngineRouting = appEngineRouting,
        body = body,
        headers = headers,
        httpMethod = httpMethod,
        relativeUri = relativeUri ?: throw PulumiNullFieldException("relativeUri"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy