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

com.pulumi.gitlab.kotlin.ProjectLevelNotificationsArgs.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

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gitlab.ProjectLevelNotificationsArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The `gitlab.ProjectLevelNotifications` resource allows to manage notifications for a project.
 * > While the API supports both groups and projects, this resource only supports projects currently.
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/notification_settings.html#group--project-level-notification-settings)
 * @property closeIssue Enable notifications for closed issues. Can only be used when `level` is `custom`.
 * @property closeMergeRequest Enable notifications for closed merge requests. Can only be used when `level` is `custom`.
 * @property failedPipeline Enable notifications for failed pipelines. Can only be used when `level` is `custom`.
 * @property fixedPipeline Enable notifications for fixed pipelines. Can only be used when `level` is `custom`.
 * @property issueDue Enable notifications for due issues. Can only be used when `level` is `custom`.
 * @property level The level of the notification. Valid values are: `disabled`, `participating`, `watch`, `global`, `mention`, `custom`.
 * @property mergeMergeRequest Enable notifications for merged merge requests. Can only be used when `level` is `custom`.
 * @property mergeWhenPipelineSucceeds Enable notifications for merged merge requests when the pipeline succeeds. Can only be used when `level` is `custom`.
 * @property movedProject Enable notifications for moved projects. Can only be used when `level` is `custom`.
 * @property newIssue Enable notifications for new issues. Can only be used when `level` is `custom`.
 * @property newMergeRequest Enable notifications for new merge requests. Can only be used when `level` is `custom`.
 * @property newNote Enable notifications for new notes on merge requests. Can only be used when `level` is `custom`.
 * @property project The ID or URL-encoded path of a project where notifications will be configured.
 * @property pushToMergeRequest Enable notifications for push to merge request branches. Can only be used when `level` is `custom`.
 * @property reassignIssue Enable notifications for issue reassignments. Can only be used when `level` is `custom`.
 * @property reassignMergeRequest Enable notifications for merge request reassignments. Can only be used when `level` is `custom`.
 * @property reopenIssue Enable notifications for reopened issues. Can only be used when `level` is `custom`.
 * @property reopenMergeRequest Enable notifications for reopened merge requests. Can only be used when `level` is `custom`.
 * @property successPipeline Enable notifications for successful pipelines. Can only be used when `level` is `custom`.
 */
public data class ProjectLevelNotificationsArgs(
    public val closeIssue: Output? = null,
    public val closeMergeRequest: Output? = null,
    public val failedPipeline: Output? = null,
    public val fixedPipeline: Output? = null,
    public val issueDue: Output? = null,
    public val level: Output? = null,
    public val mergeMergeRequest: Output? = null,
    public val mergeWhenPipelineSucceeds: Output? = null,
    public val movedProject: Output? = null,
    public val newIssue: Output? = null,
    public val newMergeRequest: Output? = null,
    public val newNote: Output? = null,
    public val project: Output? = null,
    public val pushToMergeRequest: Output? = null,
    public val reassignIssue: Output? = null,
    public val reassignMergeRequest: Output? = null,
    public val reopenIssue: Output? = null,
    public val reopenMergeRequest: Output? = null,
    public val successPipeline: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.ProjectLevelNotificationsArgs =
        com.pulumi.gitlab.ProjectLevelNotificationsArgs.builder()
            .closeIssue(closeIssue?.applyValue({ args0 -> args0 }))
            .closeMergeRequest(closeMergeRequest?.applyValue({ args0 -> args0 }))
            .failedPipeline(failedPipeline?.applyValue({ args0 -> args0 }))
            .fixedPipeline(fixedPipeline?.applyValue({ args0 -> args0 }))
            .issueDue(issueDue?.applyValue({ args0 -> args0 }))
            .level(level?.applyValue({ args0 -> args0 }))
            .mergeMergeRequest(mergeMergeRequest?.applyValue({ args0 -> args0 }))
            .mergeWhenPipelineSucceeds(mergeWhenPipelineSucceeds?.applyValue({ args0 -> args0 }))
            .movedProject(movedProject?.applyValue({ args0 -> args0 }))
            .newIssue(newIssue?.applyValue({ args0 -> args0 }))
            .newMergeRequest(newMergeRequest?.applyValue({ args0 -> args0 }))
            .newNote(newNote?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .pushToMergeRequest(pushToMergeRequest?.applyValue({ args0 -> args0 }))
            .reassignIssue(reassignIssue?.applyValue({ args0 -> args0 }))
            .reassignMergeRequest(reassignMergeRequest?.applyValue({ args0 -> args0 }))
            .reopenIssue(reopenIssue?.applyValue({ args0 -> args0 }))
            .reopenMergeRequest(reopenMergeRequest?.applyValue({ args0 -> args0 }))
            .successPipeline(successPipeline?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ProjectLevelNotificationsArgs].
 */
@PulumiTagMarker
public class ProjectLevelNotificationsArgsBuilder internal constructor() {
    private var closeIssue: Output? = null

    private var closeMergeRequest: Output? = null

    private var failedPipeline: Output? = null

    private var fixedPipeline: Output? = null

    private var issueDue: Output? = null

    private var level: Output? = null

    private var mergeMergeRequest: Output? = null

    private var mergeWhenPipelineSucceeds: Output? = null

    private var movedProject: Output? = null

    private var newIssue: Output? = null

    private var newMergeRequest: Output? = null

    private var newNote: Output? = null

    private var project: Output? = null

    private var pushToMergeRequest: Output? = null

    private var reassignIssue: Output? = null

    private var reassignMergeRequest: Output? = null

    private var reopenIssue: Output? = null

    private var reopenMergeRequest: Output? = null

    private var successPipeline: Output? = null

    /**
     * @param value Enable notifications for closed issues. Can only be used when `level` is `custom`.
     */
    @JvmName("cxabpqwwhiedxaar")
    public suspend fun closeIssue(`value`: Output) {
        this.closeIssue = value
    }

    /**
     * @param value Enable notifications for closed merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("aljfmayplousdksi")
    public suspend fun closeMergeRequest(`value`: Output) {
        this.closeMergeRequest = value
    }

    /**
     * @param value Enable notifications for failed pipelines. Can only be used when `level` is `custom`.
     */
    @JvmName("degsvmomacblkpav")
    public suspend fun failedPipeline(`value`: Output) {
        this.failedPipeline = value
    }

    /**
     * @param value Enable notifications for fixed pipelines. Can only be used when `level` is `custom`.
     */
    @JvmName("iliptlaybrmfrdgx")
    public suspend fun fixedPipeline(`value`: Output) {
        this.fixedPipeline = value
    }

    /**
     * @param value Enable notifications for due issues. Can only be used when `level` is `custom`.
     */
    @JvmName("bewukidpmvgcnorq")
    public suspend fun issueDue(`value`: Output) {
        this.issueDue = value
    }

    /**
     * @param value The level of the notification. Valid values are: `disabled`, `participating`, `watch`, `global`, `mention`, `custom`.
     */
    @JvmName("nbeqopudwxtdycto")
    public suspend fun level(`value`: Output) {
        this.level = value
    }

    /**
     * @param value Enable notifications for merged merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("emkgvwegacedhyfm")
    public suspend fun mergeMergeRequest(`value`: Output) {
        this.mergeMergeRequest = value
    }

    /**
     * @param value Enable notifications for merged merge requests when the pipeline succeeds. Can only be used when `level` is `custom`.
     */
    @JvmName("hlpmamulvqvsasqr")
    public suspend fun mergeWhenPipelineSucceeds(`value`: Output) {
        this.mergeWhenPipelineSucceeds = value
    }

    /**
     * @param value Enable notifications for moved projects. Can only be used when `level` is `custom`.
     */
    @JvmName("peptsijfcmcjnmlc")
    public suspend fun movedProject(`value`: Output) {
        this.movedProject = value
    }

    /**
     * @param value Enable notifications for new issues. Can only be used when `level` is `custom`.
     */
    @JvmName("blbjnaxvkdhqmvfy")
    public suspend fun newIssue(`value`: Output) {
        this.newIssue = value
    }

    /**
     * @param value Enable notifications for new merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("wfwyabuaufkdrqmo")
    public suspend fun newMergeRequest(`value`: Output) {
        this.newMergeRequest = value
    }

    /**
     * @param value Enable notifications for new notes on merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("pixbrkfiglqmohtl")
    public suspend fun newNote(`value`: Output) {
        this.newNote = value
    }

    /**
     * @param value The ID or URL-encoded path of a project where notifications will be configured.
     */
    @JvmName("cxqdfatwmhodlmig")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Enable notifications for push to merge request branches. Can only be used when `level` is `custom`.
     */
    @JvmName("pipwpqvrlpbsjtjf")
    public suspend fun pushToMergeRequest(`value`: Output) {
        this.pushToMergeRequest = value
    }

    /**
     * @param value Enable notifications for issue reassignments. Can only be used when `level` is `custom`.
     */
    @JvmName("ewtnysdjghixsnck")
    public suspend fun reassignIssue(`value`: Output) {
        this.reassignIssue = value
    }

    /**
     * @param value Enable notifications for merge request reassignments. Can only be used when `level` is `custom`.
     */
    @JvmName("fhxheppppmaxkfcw")
    public suspend fun reassignMergeRequest(`value`: Output) {
        this.reassignMergeRequest = value
    }

    /**
     * @param value Enable notifications for reopened issues. Can only be used when `level` is `custom`.
     */
    @JvmName("mcqxqavooedlyurf")
    public suspend fun reopenIssue(`value`: Output) {
        this.reopenIssue = value
    }

    /**
     * @param value Enable notifications for reopened merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("tdmllqaevvurdcxp")
    public suspend fun reopenMergeRequest(`value`: Output) {
        this.reopenMergeRequest = value
    }

    /**
     * @param value Enable notifications for successful pipelines. Can only be used when `level` is `custom`.
     */
    @JvmName("joleeakvgmnqxatd")
    public suspend fun successPipeline(`value`: Output) {
        this.successPipeline = value
    }

    /**
     * @param value Enable notifications for closed issues. Can only be used when `level` is `custom`.
     */
    @JvmName("lvtqwtoxjxhbdutw")
    public suspend fun closeIssue(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.closeIssue = mapped
    }

    /**
     * @param value Enable notifications for closed merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("clywmvnsnobhxxrp")
    public suspend fun closeMergeRequest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.closeMergeRequest = mapped
    }

    /**
     * @param value Enable notifications for failed pipelines. Can only be used when `level` is `custom`.
     */
    @JvmName("fspghfflrabjiwpi")
    public suspend fun failedPipeline(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.failedPipeline = mapped
    }

    /**
     * @param value Enable notifications for fixed pipelines. Can only be used when `level` is `custom`.
     */
    @JvmName("wvcokbjoixdbvyke")
    public suspend fun fixedPipeline(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fixedPipeline = mapped
    }

    /**
     * @param value Enable notifications for due issues. Can only be used when `level` is `custom`.
     */
    @JvmName("sbyfcsfiorxoklsv")
    public suspend fun issueDue(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.issueDue = mapped
    }

    /**
     * @param value The level of the notification. Valid values are: `disabled`, `participating`, `watch`, `global`, `mention`, `custom`.
     */
    @JvmName("tjgyipudwtofmqfh")
    public suspend fun level(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.level = mapped
    }

    /**
     * @param value Enable notifications for merged merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("nqdvlhnrmeprolnb")
    public suspend fun mergeMergeRequest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mergeMergeRequest = mapped
    }

    /**
     * @param value Enable notifications for merged merge requests when the pipeline succeeds. Can only be used when `level` is `custom`.
     */
    @JvmName("yfsbkegaryvbuaxk")
    public suspend fun mergeWhenPipelineSucceeds(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mergeWhenPipelineSucceeds = mapped
    }

    /**
     * @param value Enable notifications for moved projects. Can only be used when `level` is `custom`.
     */
    @JvmName("iasxbqeylyupapua")
    public suspend fun movedProject(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.movedProject = mapped
    }

    /**
     * @param value Enable notifications for new issues. Can only be used when `level` is `custom`.
     */
    @JvmName("aifbarovgsojoijp")
    public suspend fun newIssue(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.newIssue = mapped
    }

    /**
     * @param value Enable notifications for new merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("hrwdgasfcrecxvfj")
    public suspend fun newMergeRequest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.newMergeRequest = mapped
    }

    /**
     * @param value Enable notifications for new notes on merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("oaxdtheydmwruyji")
    public suspend fun newNote(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.newNote = mapped
    }

    /**
     * @param value The ID or URL-encoded path of a project where notifications will be configured.
     */
    @JvmName("ifuxpyamntyiqdvj")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Enable notifications for push to merge request branches. Can only be used when `level` is `custom`.
     */
    @JvmName("iqxbbtcfjvfbjjrt")
    public suspend fun pushToMergeRequest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pushToMergeRequest = mapped
    }

    /**
     * @param value Enable notifications for issue reassignments. Can only be used when `level` is `custom`.
     */
    @JvmName("lvkgfeiwtttyxqij")
    public suspend fun reassignIssue(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reassignIssue = mapped
    }

    /**
     * @param value Enable notifications for merge request reassignments. Can only be used when `level` is `custom`.
     */
    @JvmName("uaygegkaqkwvcidb")
    public suspend fun reassignMergeRequest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reassignMergeRequest = mapped
    }

    /**
     * @param value Enable notifications for reopened issues. Can only be used when `level` is `custom`.
     */
    @JvmName("lwbhmbegdyixbjqb")
    public suspend fun reopenIssue(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reopenIssue = mapped
    }

    /**
     * @param value Enable notifications for reopened merge requests. Can only be used when `level` is `custom`.
     */
    @JvmName("ibrvmaudrnbweoda")
    public suspend fun reopenMergeRequest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reopenMergeRequest = mapped
    }

    /**
     * @param value Enable notifications for successful pipelines. Can only be used when `level` is `custom`.
     */
    @JvmName("mpcaurnrljnttdco")
    public suspend fun successPipeline(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.successPipeline = mapped
    }

    internal fun build(): ProjectLevelNotificationsArgs = ProjectLevelNotificationsArgs(
        closeIssue = closeIssue,
        closeMergeRequest = closeMergeRequest,
        failedPipeline = failedPipeline,
        fixedPipeline = fixedPipeline,
        issueDue = issueDue,
        level = level,
        mergeMergeRequest = mergeMergeRequest,
        mergeWhenPipelineSucceeds = mergeWhenPipelineSucceeds,
        movedProject = movedProject,
        newIssue = newIssue,
        newMergeRequest = newMergeRequest,
        newNote = newNote,
        project = project,
        pushToMergeRequest = pushToMergeRequest,
        reassignIssue = reassignIssue,
        reassignMergeRequest = reassignMergeRequest,
        reopenIssue = reopenIssue,
        reopenMergeRequest = reopenMergeRequest,
        successPipeline = successPipeline,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy