com.pulumi.gitlab.kotlin.inputs.GetProjectProtectedBranchesPlainArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gitlab-kotlin Show documentation
Show all versions of pulumi-gitlab-kotlin Show documentation
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.gitlab.kotlin.inputs
import com.pulumi.gitlab.inputs.GetProjectProtectedBranchesPlainArgs.builder
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
/**
* A collection of arguments for invoking getProjectProtectedBranches.
* @property projectId The integer or path with namespace that uniquely identifies the project.
* @property protectedBranches A list of protected branches, as defined below.
*/
public data class GetProjectProtectedBranchesPlainArgs(
public val projectId: String,
public val protectedBranches: List? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gitlab.inputs.GetProjectProtectedBranchesPlainArgs =
com.pulumi.gitlab.inputs.GetProjectProtectedBranchesPlainArgs.builder()
.projectId(projectId.let({ args0 -> args0 }))
.protectedBranches(
protectedBranches?.let({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [GetProjectProtectedBranchesPlainArgs].
*/
@PulumiTagMarker
public class GetProjectProtectedBranchesPlainArgsBuilder internal constructor() {
private var projectId: String? = null
private var protectedBranches: List? = null
/**
* @param value The integer or path with namespace that uniquely identifies the project.
*/
@JvmName("obmplrisbamkoxcu")
public suspend fun projectId(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> args0 })
this.projectId = mapped
}
/**
* @param value A list of protected branches, as defined below.
*/
@JvmName("huqshrfxjskosgpb")
public suspend fun protectedBranches(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> args0 })
this.protectedBranches = mapped
}
/**
* @param argument A list of protected branches, as defined below.
*/
@JvmName("rokrwgcwpdmmavqv")
public suspend fun protectedBranches(argument: List Unit>) {
val toBeMapped = argument.toList().map {
GetProjectProtectedBranchesProtectedBranchBuilder().applySuspend { it() }.build()
}
val mapped = toBeMapped
this.protectedBranches = mapped
}
/**
* @param argument A list of protected branches, as defined below.
*/
@JvmName("uinhbucmhntyprbo")
public suspend fun protectedBranches(vararg argument: suspend GetProjectProtectedBranchesProtectedBranchBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
GetProjectProtectedBranchesProtectedBranchBuilder().applySuspend { it() }.build()
}
val mapped = toBeMapped
this.protectedBranches = mapped
}
/**
* @param argument A list of protected branches, as defined below.
*/
@JvmName("urwflhccaqgddhax")
public suspend fun protectedBranches(argument: suspend GetProjectProtectedBranchesProtectedBranchBuilder.() -> Unit) {
val toBeMapped = listOf(
GetProjectProtectedBranchesProtectedBranchBuilder().applySuspend {
argument()
}.build(),
)
val mapped = toBeMapped
this.protectedBranches = mapped
}
/**
* @param values A list of protected branches, as defined below.
*/
@JvmName("qbyvueafuaifwjqm")
public suspend fun protectedBranches(vararg values: GetProjectProtectedBranchesProtectedBranch) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> args0 })
this.protectedBranches = mapped
}
internal fun build(): GetProjectProtectedBranchesPlainArgs = GetProjectProtectedBranchesPlainArgs(
projectId = projectId ?: throw PulumiNullFieldException("projectId"),
protectedBranches = protectedBranches,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy