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

com.pulumi.gitlab.kotlin.inputs.GetProjectProtectedBranchesPlainArgs.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: 8.4.2.0
Show newest version
@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("gcyxydlhdksyuuux")
    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("twdsqmcfqqtdlvec")
    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("xegselpnojlemgul")
    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("cvfdnrnhougxlovl")
    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("smkwrraiwnjxivnl")
    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("ojprqsougkvgpewt")
    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