Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.googlenative.containeranalysis.v1alpha1.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.containeranalysis.v1alpha1.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.containeranalysis.v1alpha1.inputs.SourceArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Source describes the location of the source used for the build.
* @property additionalContexts If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
* @property artifactStorageSource If provided, the input binary artifacts for the build came from this location.
* @property context If provided, the source code used for the build came from this location.
* @property fileHashes Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file.
* @property repoSource If provided, get source from this location in a Cloud Repo.
* @property storageSource If provided, get the source from this location in Google Cloud Storage.
*/
public data class SourceArgs(
public val additionalContexts: Output>? = null,
public val artifactStorageSource: Output? = null,
public val context: Output? = null,
public val fileHashes: Output>? = null,
public val repoSource: Output? = null,
public val storageSource: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.googlenative.containeranalysis.v1alpha1.inputs.SourceArgs =
com.pulumi.googlenative.containeranalysis.v1alpha1.inputs.SourceArgs.builder()
.additionalContexts(
additionalContexts?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.artifactStorageSource(
artifactStorageSource?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.context(context?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.fileHashes(
fileHashes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.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 additionalContexts:
Output>? = null
private var artifactStorageSource: Output? = null
private var context: Output? = null
private var fileHashes: Output>? = null
private var repoSource: Output? = null
private var storageSource: Output? = null
/**
* @param value If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
*/
@JvmName("pnvhqueaelstdsuk")
public suspend fun additionalContexts(`value`: Output>) {
this.additionalContexts = value
}
@JvmName("tihfeqbqhfiboqwy")
public suspend fun additionalContexts(vararg values: Output) {
this.additionalContexts = Output.all(values.asList())
}
/**
* @param values If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
*/
@JvmName("ohkgeewejopfyeha")
public suspend fun additionalContexts(values: List>) {
this.additionalContexts = Output.all(values)
}
/**
* @param value If provided, the input binary artifacts for the build came from this location.
*/
@JvmName("vdsfhbswmoyjhmyj")
public suspend fun artifactStorageSource(`value`: Output) {
this.artifactStorageSource = value
}
/**
* @param value If provided, the source code used for the build came from this location.
*/
@JvmName("rdnbxujtqycqeurl")
public suspend fun context(`value`: Output) {
this.context = value
}
/**
* @param value Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file.
*/
@JvmName("flfsmcdmlspkxget")
public suspend fun fileHashes(`value`: Output>) {
this.fileHashes = value
}
/**
* @param value If provided, get source from this location in a Cloud Repo.
*/
@JvmName("fqgsvudoclhhphfv")
public suspend fun repoSource(`value`: Output) {
this.repoSource = value
}
/**
* @param value If provided, get the source from this location in Google Cloud Storage.
*/
@JvmName("pstfgaslmkdhrnst")
public suspend fun storageSource(`value`: Output) {
this.storageSource = value
}
/**
* @param value If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
*/
@JvmName("yhjkvdcljyxvqpiq")
public suspend fun additionalContexts(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.additionalContexts = mapped
}
/**
* @param argument If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
*/
@JvmName("juiqhrheyupgrqjw")
public suspend fun additionalContexts(argument: List Unit>) {
val toBeMapped = argument.toList().map {
GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.additionalContexts = mapped
}
/**
* @param argument If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
*/
@JvmName("gwlkjkulfyvyslci")
public suspend fun additionalContexts(vararg argument: suspend GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.additionalContexts = mapped
}
/**
* @param argument If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
*/
@JvmName("wtmnurslpvseihfv")
public suspend fun additionalContexts(argument: suspend GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgsBuilder.() -> Unit) {
val toBeMapped =
listOf(
GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.additionalContexts = mapped
}
/**
* @param values If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
*/
@JvmName("rscarbjcfpahismu")
public suspend fun additionalContexts(vararg values: GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.additionalContexts = mapped
}
/**
* @param value If provided, the input binary artifacts for the build came from this location.
*/
@JvmName("acrhjlivnymfsoio")
public suspend fun artifactStorageSource(`value`: StorageSourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.artifactStorageSource = mapped
}
/**
* @param argument If provided, the input binary artifacts for the build came from this location.
*/
@JvmName("yhnafrlwxdvyjirt")
public suspend fun artifactStorageSource(argument: suspend StorageSourceArgsBuilder.() -> Unit) {
val toBeMapped = StorageSourceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.artifactStorageSource = mapped
}
/**
* @param value If provided, the source code used for the build came from this location.
*/
@JvmName("myjdjwchdfahqyns")
public suspend fun context(`value`: GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.context = mapped
}
/**
* @param argument If provided, the source code used for the build came from this location.
*/
@JvmName("sxnhaytfuvurgjtj")
public suspend fun context(argument: suspend GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgsBuilder.() -> Unit) {
val toBeMapped = GoogleDevtoolsContaineranalysisV1alpha1SourceContextArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.context = mapped
}
/**
* @param value Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file.
*/
@JvmName("gfxlucavnkxjlirb")
public suspend fun fileHashes(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.fileHashes = mapped
}
/**
* @param values Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file.
*/
@JvmName("geyvmaiqodoltsnq")
public fun fileHashes(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.fileHashes = mapped
}
/**
* @param value If provided, get source from this location in a Cloud Repo.
*/
@JvmName("rfmquahghffmwtem")
public suspend fun repoSource(`value`: RepoSourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.repoSource = mapped
}
/**
* @param argument If provided, get source from this location in a Cloud Repo.
*/
@JvmName("biqbcelqldknupsr")
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("ocboeykrtexhpbei")
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("jvhktxfgqadwgdif")
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(
additionalContexts = additionalContexts,
artifactStorageSource = artifactStorageSource,
context = context,
fileHashes = fileHashes,
repoSource = repoSource,
storageSource = storageSource,
)
}