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

com.pulumi.googlenative.servicemanagement.v1.kotlin.inputs.MethodArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.servicemanagement.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.servicemanagement.v1.inputs.MethodArgs.builder
import com.pulumi.googlenative.servicemanagement.v1.kotlin.enums.MethodSyntax
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Method represents a method of an API interface.
 * @property name The simple name of this method.
 * @property options Any metadata attached to the method.
 * @property requestStreaming If true, the request is streamed.
 * @property requestTypeUrl A URL of the input message type.
 * @property responseStreaming If true, the response is streamed.
 * @property responseTypeUrl The URL of the output message type.
 * @property syntax The source syntax of this method.
 */
public data class MethodArgs(
    public val name: Output? = null,
    public val options: Output>? = null,
    public val requestStreaming: Output? = null,
    public val requestTypeUrl: Output? = null,
    public val responseStreaming: Output? = null,
    public val responseTypeUrl: Output? = null,
    public val syntax: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.servicemanagement.v1.inputs.MethodArgs =
        com.pulumi.googlenative.servicemanagement.v1.inputs.MethodArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .options(
                options?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .requestStreaming(requestStreaming?.applyValue({ args0 -> args0 }))
            .requestTypeUrl(requestTypeUrl?.applyValue({ args0 -> args0 }))
            .responseStreaming(responseStreaming?.applyValue({ args0 -> args0 }))
            .responseTypeUrl(responseTypeUrl?.applyValue({ args0 -> args0 }))
            .syntax(syntax?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [MethodArgs].
 */
@PulumiTagMarker
public class MethodArgsBuilder internal constructor() {
    private var name: Output? = null

    private var options: Output>? = null

    private var requestStreaming: Output? = null

    private var requestTypeUrl: Output? = null

    private var responseStreaming: Output? = null

    private var responseTypeUrl: Output? = null

    private var syntax: Output? = null

    /**
     * @param value The simple name of this method.
     */
    @JvmName("kbyyneokyqgnflik")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Any metadata attached to the method.
     */
    @JvmName("kapkhfylymlfryjg")
    public suspend fun options(`value`: Output>) {
        this.options = value
    }

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

    /**
     * @param values Any metadata attached to the method.
     */
    @JvmName("ibcufunwnlxuobsy")
    public suspend fun options(values: List>) {
        this.options = Output.all(values)
    }

    /**
     * @param value If true, the request is streamed.
     */
    @JvmName("nnyhnjiplrenrmiv")
    public suspend fun requestStreaming(`value`: Output) {
        this.requestStreaming = value
    }

    /**
     * @param value A URL of the input message type.
     */
    @JvmName("ocrxfmhebacpsrsr")
    public suspend fun requestTypeUrl(`value`: Output) {
        this.requestTypeUrl = value
    }

    /**
     * @param value If true, the response is streamed.
     */
    @JvmName("vihobglvkpfchdif")
    public suspend fun responseStreaming(`value`: Output) {
        this.responseStreaming = value
    }

    /**
     * @param value The URL of the output message type.
     */
    @JvmName("qemggieaoevmxqdh")
    public suspend fun responseTypeUrl(`value`: Output) {
        this.responseTypeUrl = value
    }

    /**
     * @param value The source syntax of this method.
     */
    @JvmName("vqxmkkopjjaghfiu")
    public suspend fun syntax(`value`: Output) {
        this.syntax = value
    }

    /**
     * @param value The simple name of this method.
     */
    @JvmName("iiknhrllyvxnimvc")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Any metadata attached to the method.
     */
    @JvmName("umjrwicuafypobmk")
    public suspend fun options(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.options = mapped
    }

    /**
     * @param argument Any metadata attached to the method.
     */
    @JvmName("hdispavnwhsbdnni")
    public suspend fun options(argument: List Unit>) {
        val toBeMapped = argument.toList().map { OptionArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.options = mapped
    }

    /**
     * @param argument Any metadata attached to the method.
     */
    @JvmName("lgqeyheupsdompxl")
    public suspend fun options(vararg argument: suspend OptionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { OptionArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.options = mapped
    }

    /**
     * @param argument Any metadata attached to the method.
     */
    @JvmName("mkeknmvpuyybnwor")
    public suspend fun options(argument: suspend OptionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(OptionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.options = mapped
    }

    /**
     * @param values Any metadata attached to the method.
     */
    @JvmName("bclivdfaklvxihbi")
    public suspend fun options(vararg values: OptionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.options = mapped
    }

    /**
     * @param value If true, the request is streamed.
     */
    @JvmName("ffmhthqcxivqkjtj")
    public suspend fun requestStreaming(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestStreaming = mapped
    }

    /**
     * @param value A URL of the input message type.
     */
    @JvmName("yxjvaivwxkebuhgu")
    public suspend fun requestTypeUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestTypeUrl = mapped
    }

    /**
     * @param value If true, the response is streamed.
     */
    @JvmName("uiuxsnjvduvawlle")
    public suspend fun responseStreaming(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseStreaming = mapped
    }

    /**
     * @param value The URL of the output message type.
     */
    @JvmName("sekhhvtmecfcpmtg")
    public suspend fun responseTypeUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseTypeUrl = mapped
    }

    /**
     * @param value The source syntax of this method.
     */
    @JvmName("nqvjyqmcepknxxas")
    public suspend fun syntax(`value`: MethodSyntax?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.syntax = mapped
    }

    internal fun build(): MethodArgs = MethodArgs(
        name = name,
        options = options,
        requestStreaming = requestStreaming,
        requestTypeUrl = requestTypeUrl,
        responseStreaming = responseStreaming,
        responseTypeUrl = responseTypeUrl,
        syntax = syntax,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy