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

com.pulumi.gitlab.kotlin.inputs.GetProjectProtectedBranchMergeAccessLevel.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.GetProjectProtectedBranchMergeAccessLevel.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property accessLevel Access levels allowed to merge to protected branch. Valid values are: `no one`, `developer`, `maintainer`.
 * @property accessLevelDescription Readable description of access level.
 * @property groupId The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with `user_id`.
 * @property userId The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with `group_id`.
 */
public data class GetProjectProtectedBranchMergeAccessLevel(
    public val accessLevel: String,
    public val accessLevelDescription: String,
    public val groupId: Int? = null,
    public val userId: Int? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.inputs.GetProjectProtectedBranchMergeAccessLevel =
        com.pulumi.gitlab.inputs.GetProjectProtectedBranchMergeAccessLevel.builder()
            .accessLevel(accessLevel.let({ args0 -> args0 }))
            .accessLevelDescription(accessLevelDescription.let({ args0 -> args0 }))
            .groupId(groupId?.let({ args0 -> args0 }))
            .userId(userId?.let({ args0 -> args0 })).build()
}

/**
 * Builder for [GetProjectProtectedBranchMergeAccessLevel].
 */
@PulumiTagMarker
public class GetProjectProtectedBranchMergeAccessLevelBuilder internal constructor() {
    private var accessLevel: String? = null

    private var accessLevelDescription: String? = null

    private var groupId: Int? = null

    private var userId: Int? = null

    /**
     * @param value Access levels allowed to merge to protected branch. Valid values are: `no one`, `developer`, `maintainer`.
     */
    @JvmName("wltkesknjysgjnlc")
    public suspend fun accessLevel(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.accessLevel = mapped
    }

    /**
     * @param value Readable description of access level.
     */
    @JvmName("kuwtqdjitolfachj")
    public suspend fun accessLevelDescription(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.accessLevelDescription = mapped
    }

    /**
     * @param value The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with `user_id`.
     */
    @JvmName("owuctkpifaflehyd")
    public suspend fun groupId(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.groupId = mapped
    }

    /**
     * @param value The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with `group_id`.
     */
    @JvmName("vfncguntneklsbmq")
    public suspend fun userId(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.userId = mapped
    }

    internal fun build(): GetProjectProtectedBranchMergeAccessLevel =
        GetProjectProtectedBranchMergeAccessLevel(
            accessLevel = accessLevel ?: throw PulumiNullFieldException("accessLevel"),
            accessLevelDescription = accessLevelDescription ?: throw
                PulumiNullFieldException("accessLevelDescription"),
            groupId = groupId,
            userId = userId,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy