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

com.pulumi.azure.apimanagement.kotlin.inputs.ApiOperationRequestRepresentationArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.apimanagement.kotlin.inputs

import com.pulumi.azure.apimanagement.inputs.ApiOperationRequestRepresentationArgs.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 com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property contentType The Content Type of this representation, such as `application/json`.
 * @property examples One or more `example` blocks as defined above.
 * @property formParameters One or more `form_parameter` block as defined above.
 * > **NOTE:** This is Required when `content_type` is set to `application/x-www-form-urlencoded` or `multipart/form-data`.
 * @property schemaId The ID of an API Management Schema which represents this Response.
 * > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`.
 * @property typeName The Type Name defined by the Schema.
 * > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`.
 */
public data class ApiOperationRequestRepresentationArgs(
    public val contentType: Output,
    public val examples: Output>? = null,
    public val formParameters: Output>? =
        null,
    public val schemaId: Output? = null,
    public val typeName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.apimanagement.inputs.ApiOperationRequestRepresentationArgs = com.pulumi.azure.apimanagement.inputs.ApiOperationRequestRepresentationArgs.builder()
        .contentType(contentType.applyValue({ args0 -> args0 }))
        .examples(
            examples?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .formParameters(
            formParameters?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .schemaId(schemaId?.applyValue({ args0 -> args0 }))
        .typeName(typeName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ApiOperationRequestRepresentationArgs].
 */
@PulumiTagMarker
public class ApiOperationRequestRepresentationArgsBuilder internal constructor() {
    private var contentType: Output? = null

    private var examples: Output>? = null

    private var formParameters: Output>? =
        null

    private var schemaId: Output? = null

    private var typeName: Output? = null

    /**
     * @param value The Content Type of this representation, such as `application/json`.
     */
    @JvmName("bieddbhbpbvwulwx")
    public suspend fun contentType(`value`: Output) {
        this.contentType = value
    }

    /**
     * @param value One or more `example` blocks as defined above.
     */
    @JvmName("vqoaaqwuahahirbx")
    public suspend fun examples(`value`: Output>) {
        this.examples = value
    }

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

    /**
     * @param values One or more `example` blocks as defined above.
     */
    @JvmName("cqbtfeigxmvnloah")
    public suspend fun examples(values: List>) {
        this.examples = Output.all(values)
    }

    /**
     * @param value One or more `form_parameter` block as defined above.
     * > **NOTE:** This is Required when `content_type` is set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("nfckfxhxlsprmvuh")
    public suspend fun formParameters(`value`: Output>) {
        this.formParameters = value
    }

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

    /**
     * @param values One or more `form_parameter` block as defined above.
     * > **NOTE:** This is Required when `content_type` is set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("cwicumjkabbumwxr")
    public suspend fun formParameters(values: List>) {
        this.formParameters = Output.all(values)
    }

    /**
     * @param value The ID of an API Management Schema which represents this Response.
     * > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("jiatiloxvqnyyntq")
    public suspend fun schemaId(`value`: Output) {
        this.schemaId = value
    }

    /**
     * @param value The Type Name defined by the Schema.
     * > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("lshpqmoxgixbrjel")
    public suspend fun typeName(`value`: Output) {
        this.typeName = value
    }

    /**
     * @param value The Content Type of this representation, such as `application/json`.
     */
    @JvmName("vqopbdlgpwrqycxp")
    public suspend fun contentType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.contentType = mapped
    }

    /**
     * @param value One or more `example` blocks as defined above.
     */
    @JvmName("neulnuogonrvixak")
    public suspend fun examples(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.examples = mapped
    }

    /**
     * @param argument One or more `example` blocks as defined above.
     */
    @JvmName("dlaqxhihnibbphye")
    public suspend fun examples(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ApiOperationRequestRepresentationExampleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.examples = mapped
    }

    /**
     * @param argument One or more `example` blocks as defined above.
     */
    @JvmName("okqrbmiutvkbqtep")
    public suspend fun examples(vararg argument: suspend ApiOperationRequestRepresentationExampleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ApiOperationRequestRepresentationExampleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.examples = mapped
    }

    /**
     * @param argument One or more `example` blocks as defined above.
     */
    @JvmName("oxedqehukvfyvkwk")
    public suspend fun examples(argument: suspend ApiOperationRequestRepresentationExampleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ApiOperationRequestRepresentationExampleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.examples = mapped
    }

    /**
     * @param values One or more `example` blocks as defined above.
     */
    @JvmName("fybspvesuyjedyro")
    public suspend fun examples(vararg values: ApiOperationRequestRepresentationExampleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.examples = mapped
    }

    /**
     * @param value One or more `form_parameter` block as defined above.
     * > **NOTE:** This is Required when `content_type` is set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("tjhfhejtbxihgtek")
    public suspend fun formParameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.formParameters = mapped
    }

    /**
     * @param argument One or more `form_parameter` block as defined above.
     * > **NOTE:** This is Required when `content_type` is set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("ygkwjusepdaemnpy")
    public suspend fun formParameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ApiOperationRequestRepresentationFormParameterArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.formParameters = mapped
    }

    /**
     * @param argument One or more `form_parameter` block as defined above.
     * > **NOTE:** This is Required when `content_type` is set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("konbedrrqqjiyrng")
    public suspend fun formParameters(vararg argument: suspend ApiOperationRequestRepresentationFormParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ApiOperationRequestRepresentationFormParameterArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.formParameters = mapped
    }

    /**
     * @param argument One or more `form_parameter` block as defined above.
     * > **NOTE:** This is Required when `content_type` is set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("gviqcqaceululicc")
    public suspend fun formParameters(argument: suspend ApiOperationRequestRepresentationFormParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ApiOperationRequestRepresentationFormParameterArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.formParameters = mapped
    }

    /**
     * @param values One or more `form_parameter` block as defined above.
     * > **NOTE:** This is Required when `content_type` is set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("mlrvfubhrfpgqhur")
    public suspend fun formParameters(vararg values: ApiOperationRequestRepresentationFormParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.formParameters = mapped
    }

    /**
     * @param value The ID of an API Management Schema which represents this Response.
     * > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("lbewbwtdlfcsnlhk")
    public suspend fun schemaId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schemaId = mapped
    }

    /**
     * @param value The Type Name defined by the Schema.
     * > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`.
     */
    @JvmName("mfdigmqvfddyhwjs")
    public suspend fun typeName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.typeName = mapped
    }

    internal fun build(): ApiOperationRequestRepresentationArgs =
        ApiOperationRequestRepresentationArgs(
            contentType = contentType ?: throw PulumiNullFieldException("contentType"),
            examples = examples,
            formParameters = formParameters,
            schemaId = schemaId,
            typeName = typeName,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy