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

com.pulumi.googlenative.cloudfunctions.v2.kotlin.inputs.SourceArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.cloudfunctions.v2.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.cloudfunctions.v2.inputs.SourceArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * The location of the function source code.
 * @property repoSource If provided, get the source from this location in a Cloud Source Repository.
 * @property storageSource If provided, get the source from this location in Google Cloud Storage.
 */
public data class SourceArgs(
    public val repoSource: Output? = null,
    public val storageSource: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.cloudfunctions.v2.inputs.SourceArgs =
        com.pulumi.googlenative.cloudfunctions.v2.inputs.SourceArgs.builder()
            .repoSource(repoSource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .storageSource(storageSource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [SourceArgs].
 */
@PulumiTagMarker
public class SourceArgsBuilder internal constructor() {
    private var repoSource: Output? = null

    private var storageSource: Output? = null

    /**
     * @param value If provided, get the source from this location in a Cloud Source Repository.
     */
    @JvmName("piameceeiiadqolq")
    public suspend fun repoSource(`value`: Output) {
        this.repoSource = value
    }

    /**
     * @param value If provided, get the source from this location in Google Cloud Storage.
     */
    @JvmName("kjlbshdqqoeabefk")
    public suspend fun storageSource(`value`: Output) {
        this.storageSource = value
    }

    /**
     * @param value If provided, get the source from this location in a Cloud Source Repository.
     */
    @JvmName("ngagrchroyrdcjkq")
    public suspend fun repoSource(`value`: RepoSourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.repoSource = mapped
    }

    /**
     * @param argument If provided, get the source from this location in a Cloud Source Repository.
     */
    @JvmName("hhkbdlmhotulhnli")
    public suspend fun repoSource(argument: suspend RepoSourceArgsBuilder.() -> Unit) {
        val toBeMapped = RepoSourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.repoSource = mapped
    }

    /**
     * @param value If provided, get the source from this location in Google Cloud Storage.
     */
    @JvmName("frjgsunxvmeklflm")
    public suspend fun storageSource(`value`: StorageSourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageSource = mapped
    }

    /**
     * @param argument If provided, get the source from this location in Google Cloud Storage.
     */
    @JvmName("husqmnvqbmswushw")
    public suspend fun storageSource(argument: suspend StorageSourceArgsBuilder.() -> Unit) {
        val toBeMapped = StorageSourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.storageSource = mapped
    }

    internal fun build(): SourceArgs = SourceArgs(
        repoSource = repoSource,
        storageSource = storageSource,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy