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

com.pulumi.azurenative.servicelinker.kotlin.inputs.AzureResourceArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.servicelinker.kotlin.inputs

import com.pulumi.azurenative.servicelinker.inputs.AzureResourceArgs.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.jvm.JvmName

/**
 * The azure resource info when target service type is AzureResource
 * @property id The Id of azure resource.
 * @property resourceProperties The azure resource connection related properties.
 * @property type The target service type.
 * Expected value is 'AzureResource'.
 */
public data class AzureResourceArgs(
    public val id: Output? = null,
    public val resourceProperties: Output? = null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.servicelinker.inputs.AzureResourceArgs =
        com.pulumi.azurenative.servicelinker.inputs.AzureResourceArgs.builder()
            .id(id?.applyValue({ args0 -> args0 }))
            .resourceProperties(
                resourceProperties?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AzureResourceArgs].
 */
@PulumiTagMarker
public class AzureResourceArgsBuilder internal constructor() {
    private var id: Output? = null

    private var resourceProperties: Output? = null

    private var type: Output? = null

    /**
     * @param value The Id of azure resource.
     */
    @JvmName("uapteptbqggaeceu")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value The azure resource connection related properties.
     */
    @JvmName("narbghdhleqakaty")
    public suspend fun resourceProperties(`value`: Output) {
        this.resourceProperties = value
    }

    /**
     * @param value The target service type.
     * Expected value is 'AzureResource'.
     */
    @JvmName("vajpbodmpblfmwwt")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The Id of azure resource.
     */
    @JvmName("umhengoherpmfyra")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value The azure resource connection related properties.
     */
    @JvmName("duleqrygqjkjyywe")
    public suspend fun resourceProperties(`value`: AzureKeyVaultPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceProperties = mapped
    }

    /**
     * @param argument The azure resource connection related properties.
     */
    @JvmName("dqydykarybfrgbvt")
    public suspend fun resourceProperties(argument: suspend AzureKeyVaultPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = AzureKeyVaultPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.resourceProperties = mapped
    }

    /**
     * @param value The target service type.
     * Expected value is 'AzureResource'.
     */
    @JvmName("dsellrsdlhrhnxtg")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): AzureResourceArgs = AzureResourceArgs(
        id = id,
        resourceProperties = resourceProperties,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy