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

com.pulumi.azurenative.app.kotlin.inputs.HttpGetArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.app.kotlin.inputs

import com.pulumi.azurenative.app.inputs.HttpGetArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Model representing a http get request.
 * @property fileName Name of the file that the request should be saved to.
 * @property headers List of headers to send with the request.
 * @property url URL to make HTTP GET request against.
 */
public data class HttpGetArgs(
    public val fileName: Output? = null,
    public val headers: Output>? = null,
    public val url: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.app.inputs.HttpGetArgs =
        com.pulumi.azurenative.app.inputs.HttpGetArgs.builder()
            .fileName(fileName?.applyValue({ args0 -> args0 }))
            .headers(headers?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .url(url.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HttpGetArgs].
 */
@PulumiTagMarker
public class HttpGetArgsBuilder internal constructor() {
    private var fileName: Output? = null

    private var headers: Output>? = null

    private var url: Output? = null

    /**
     * @param value Name of the file that the request should be saved to.
     */
    @JvmName("rnuqhegotscbypaf")
    public suspend fun fileName(`value`: Output) {
        this.fileName = value
    }

    /**
     * @param value List of headers to send with the request.
     */
    @JvmName("wxovafpdjxhmeird")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

    @JvmName("fgejvnqejjbthrpd")
    public suspend fun headers(vararg values: Output) {
        this.headers = Output.all(values.asList())
    }

    /**
     * @param values List of headers to send with the request.
     */
    @JvmName("bsuehtnhgqvkaeoa")
    public suspend fun headers(values: List>) {
        this.headers = Output.all(values)
    }

    /**
     * @param value URL to make HTTP GET request against.
     */
    @JvmName("stjdurphxpqsjrpo")
    public suspend fun url(`value`: Output) {
        this.url = value
    }

    /**
     * @param value Name of the file that the request should be saved to.
     */
    @JvmName("mnpurwikgqtxteru")
    public suspend fun fileName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fileName = mapped
    }

    /**
     * @param value List of headers to send with the request.
     */
    @JvmName("jryabgchgnmjmahj")
    public suspend fun headers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param values List of headers to send with the request.
     */
    @JvmName("bwnhxgseylvjvjvn")
    public suspend fun headers(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value URL to make HTTP GET request against.
     */
    @JvmName("eukhvkkpcxglxjqj")
    public suspend fun url(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.url = mapped
    }

    internal fun build(): HttpGetArgs = HttpGetArgs(
        fileName = fileName,
        headers = headers,
        url = url ?: throw PulumiNullFieldException("url"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy