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

com.pulumi.gitlab.kotlin.GroupHookArgs.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.GroupHookArgs.builder
import com.pulumi.gitlab.kotlin.inputs.GroupHookCustomHeaderArgs
import com.pulumi.gitlab.kotlin.inputs.GroupHookCustomHeaderArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The `gitlab.GroupHook` resource allows to manage the lifecycle of a group hook.
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#hooks)
 * ## Import
 * Starting in Terraform v1.5.0 you can use an import block to import `gitlab_group_hook`. For example:
 * terraform
 * import {
 *   to = gitlab_group_hook.example
 *   id = "see CLI command below for ID"
 * }
 * Import using the CLI is supported using the following syntax:
 * A GitLab Group Hook can be imported using a key composed of `:`, e.g.
 * ```sh
 * $ pulumi import gitlab:index/groupHook:GroupHook example "12345:1"
 * ```
 * NOTE: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API.
 * @property confidentialIssuesEvents Invoke the hook for confidential issues events.
 * @property confidentialNoteEvents Invoke the hook for confidential note events.
 * @property customHeaders Custom headers for the project webhook.
 * @property customWebhookTemplate Custom webhook template.
 * @property deploymentEvents Invoke the hook for deployment events.
 * @property enableSslVerification Enable SSL verification when invoking the hook.
 * @property group The full path or id of the group to add the hook to.
 * @property issuesEvents Invoke the hook for issues events.
 * @property jobEvents Invoke the hook for job events.
 * @property mergeRequestsEvents Invoke the hook for merge requests events.
 * @property noteEvents Invoke the hook for note events.
 * @property pipelineEvents Invoke the hook for pipeline events.
 * @property pushEvents Invoke the hook for push events.
 * @property pushEventsBranchFilter Invoke the hook for push events on matching branches only.
 * @property releasesEvents Invoke the hook for release events.
 * @property subgroupEvents Invoke the hook for subgroup events.
 * @property tagPushEvents Invoke the hook for tag push events.
 * @property token A token to present when invoking the hook. The token is not available for imported resources.
 * @property url The url of the hook to invoke. Forces re-creation to preserve `token`.
 * @property wikiPageEvents Invoke the hook for wiki page events.
 */
public data class GroupHookArgs(
    public val confidentialIssuesEvents: Output? = null,
    public val confidentialNoteEvents: Output? = null,
    public val customHeaders: Output>? = null,
    public val customWebhookTemplate: Output? = null,
    public val deploymentEvents: Output? = null,
    public val enableSslVerification: Output? = null,
    public val group: Output? = null,
    public val issuesEvents: Output? = null,
    public val jobEvents: Output? = null,
    public val mergeRequestsEvents: Output? = null,
    public val noteEvents: Output? = null,
    public val pipelineEvents: Output? = null,
    public val pushEvents: Output? = null,
    public val pushEventsBranchFilter: Output? = null,
    public val releasesEvents: Output? = null,
    public val subgroupEvents: Output? = null,
    public val tagPushEvents: Output? = null,
    public val token: Output? = null,
    public val url: Output? = null,
    public val wikiPageEvents: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.GroupHookArgs = com.pulumi.gitlab.GroupHookArgs.builder()
        .confidentialIssuesEvents(confidentialIssuesEvents?.applyValue({ args0 -> args0 }))
        .confidentialNoteEvents(confidentialNoteEvents?.applyValue({ args0 -> args0 }))
        .customHeaders(
            customHeaders?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .customWebhookTemplate(customWebhookTemplate?.applyValue({ args0 -> args0 }))
        .deploymentEvents(deploymentEvents?.applyValue({ args0 -> args0 }))
        .enableSslVerification(enableSslVerification?.applyValue({ args0 -> args0 }))
        .group(group?.applyValue({ args0 -> args0 }))
        .issuesEvents(issuesEvents?.applyValue({ args0 -> args0 }))
        .jobEvents(jobEvents?.applyValue({ args0 -> args0 }))
        .mergeRequestsEvents(mergeRequestsEvents?.applyValue({ args0 -> args0 }))
        .noteEvents(noteEvents?.applyValue({ args0 -> args0 }))
        .pipelineEvents(pipelineEvents?.applyValue({ args0 -> args0 }))
        .pushEvents(pushEvents?.applyValue({ args0 -> args0 }))
        .pushEventsBranchFilter(pushEventsBranchFilter?.applyValue({ args0 -> args0 }))
        .releasesEvents(releasesEvents?.applyValue({ args0 -> args0 }))
        .subgroupEvents(subgroupEvents?.applyValue({ args0 -> args0 }))
        .tagPushEvents(tagPushEvents?.applyValue({ args0 -> args0 }))
        .token(token?.applyValue({ args0 -> args0 }))
        .url(url?.applyValue({ args0 -> args0 }))
        .wikiPageEvents(wikiPageEvents?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GroupHookArgs].
 */
@PulumiTagMarker
public class GroupHookArgsBuilder internal constructor() {
    private var confidentialIssuesEvents: Output? = null

    private var confidentialNoteEvents: Output? = null

    private var customHeaders: Output>? = null

    private var customWebhookTemplate: Output? = null

    private var deploymentEvents: Output? = null

    private var enableSslVerification: Output? = null

    private var group: Output? = null

    private var issuesEvents: Output? = null

    private var jobEvents: Output? = null

    private var mergeRequestsEvents: Output? = null

    private var noteEvents: Output? = null

    private var pipelineEvents: Output? = null

    private var pushEvents: Output? = null

    private var pushEventsBranchFilter: Output? = null

    private var releasesEvents: Output? = null

    private var subgroupEvents: Output? = null

    private var tagPushEvents: Output? = null

    private var token: Output? = null

    private var url: Output? = null

    private var wikiPageEvents: Output? = null

    /**
     * @param value Invoke the hook for confidential issues events.
     */
    @JvmName("phaxqdsubxlfeopi")
    public suspend fun confidentialIssuesEvents(`value`: Output) {
        this.confidentialIssuesEvents = value
    }

    /**
     * @param value Invoke the hook for confidential note events.
     */
    @JvmName("kxaehgnodgcmbgub")
    public suspend fun confidentialNoteEvents(`value`: Output) {
        this.confidentialNoteEvents = value
    }

    /**
     * @param value Custom headers for the project webhook.
     */
    @JvmName("qriuklhahdoibcjt")
    public suspend fun customHeaders(`value`: Output>) {
        this.customHeaders = value
    }

    @JvmName("dwpoblhguraqruib")
    public suspend fun customHeaders(vararg values: Output) {
        this.customHeaders = Output.all(values.asList())
    }

    /**
     * @param values Custom headers for the project webhook.
     */
    @JvmName("yiyxmkfblqjvhdvu")
    public suspend fun customHeaders(values: List>) {
        this.customHeaders = Output.all(values)
    }

    /**
     * @param value Custom webhook template.
     */
    @JvmName("kypykfstvydhfpyi")
    public suspend fun customWebhookTemplate(`value`: Output) {
        this.customWebhookTemplate = value
    }

    /**
     * @param value Invoke the hook for deployment events.
     */
    @JvmName("oajojfouoiyyybae")
    public suspend fun deploymentEvents(`value`: Output) {
        this.deploymentEvents = value
    }

    /**
     * @param value Enable SSL verification when invoking the hook.
     */
    @JvmName("gcmdevbgompxkfql")
    public suspend fun enableSslVerification(`value`: Output) {
        this.enableSslVerification = value
    }

    /**
     * @param value The full path or id of the group to add the hook to.
     */
    @JvmName("aatovirdnigsefkl")
    public suspend fun group(`value`: Output) {
        this.group = value
    }

    /**
     * @param value Invoke the hook for issues events.
     */
    @JvmName("jtkcfvjclmsknegt")
    public suspend fun issuesEvents(`value`: Output) {
        this.issuesEvents = value
    }

    /**
     * @param value Invoke the hook for job events.
     */
    @JvmName("apgvgbllgwakanhk")
    public suspend fun jobEvents(`value`: Output) {
        this.jobEvents = value
    }

    /**
     * @param value Invoke the hook for merge requests events.
     */
    @JvmName("ryovutqevlegodsk")
    public suspend fun mergeRequestsEvents(`value`: Output) {
        this.mergeRequestsEvents = value
    }

    /**
     * @param value Invoke the hook for note events.
     */
    @JvmName("jenqaciayiyoewit")
    public suspend fun noteEvents(`value`: Output) {
        this.noteEvents = value
    }

    /**
     * @param value Invoke the hook for pipeline events.
     */
    @JvmName("uplrdugjcujoxyag")
    public suspend fun pipelineEvents(`value`: Output) {
        this.pipelineEvents = value
    }

    /**
     * @param value Invoke the hook for push events.
     */
    @JvmName("ytjxcqcakagecxul")
    public suspend fun pushEvents(`value`: Output) {
        this.pushEvents = value
    }

    /**
     * @param value Invoke the hook for push events on matching branches only.
     */
    @JvmName("tiupbgapoyukbnmt")
    public suspend fun pushEventsBranchFilter(`value`: Output) {
        this.pushEventsBranchFilter = value
    }

    /**
     * @param value Invoke the hook for release events.
     */
    @JvmName("lgjbaonjlgifpfje")
    public suspend fun releasesEvents(`value`: Output) {
        this.releasesEvents = value
    }

    /**
     * @param value Invoke the hook for subgroup events.
     */
    @JvmName("fgfxvfopbmqrepcn")
    public suspend fun subgroupEvents(`value`: Output) {
        this.subgroupEvents = value
    }

    /**
     * @param value Invoke the hook for tag push events.
     */
    @JvmName("vssavyiditxgsmnd")
    public suspend fun tagPushEvents(`value`: Output) {
        this.tagPushEvents = value
    }

    /**
     * @param value A token to present when invoking the hook. The token is not available for imported resources.
     */
    @JvmName("cwqhsiobmgnpkkgw")
    public suspend fun token(`value`: Output) {
        this.token = value
    }

    /**
     * @param value The url of the hook to invoke. Forces re-creation to preserve `token`.
     */
    @JvmName("twosydhobkyebhke")
    public suspend fun url(`value`: Output) {
        this.url = value
    }

    /**
     * @param value Invoke the hook for wiki page events.
     */
    @JvmName("wtnxueybnjpwtnrg")
    public suspend fun wikiPageEvents(`value`: Output) {
        this.wikiPageEvents = value
    }

    /**
     * @param value Invoke the hook for confidential issues events.
     */
    @JvmName("plvqqpdwngdghsxo")
    public suspend fun confidentialIssuesEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.confidentialIssuesEvents = mapped
    }

    /**
     * @param value Invoke the hook for confidential note events.
     */
    @JvmName("ceypgymdplevqwhq")
    public suspend fun confidentialNoteEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.confidentialNoteEvents = mapped
    }

    /**
     * @param value Custom headers for the project webhook.
     */
    @JvmName("rdvplthqmggsytkk")
    public suspend fun customHeaders(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customHeaders = mapped
    }

    /**
     * @param argument Custom headers for the project webhook.
     */
    @JvmName("lmobpkpasplmdvwv")
    public suspend fun customHeaders(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GroupHookCustomHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.customHeaders = mapped
    }

    /**
     * @param argument Custom headers for the project webhook.
     */
    @JvmName("mbsclhgsovhqqrfn")
    public suspend fun customHeaders(vararg argument: suspend GroupHookCustomHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GroupHookCustomHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.customHeaders = mapped
    }

    /**
     * @param argument Custom headers for the project webhook.
     */
    @JvmName("ujvxyyssemgvhcxg")
    public suspend fun customHeaders(argument: suspend GroupHookCustomHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(GroupHookCustomHeaderArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.customHeaders = mapped
    }

    /**
     * @param values Custom headers for the project webhook.
     */
    @JvmName("vmiyxlalqavlkxuc")
    public suspend fun customHeaders(vararg values: GroupHookCustomHeaderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customHeaders = mapped
    }

    /**
     * @param value Custom webhook template.
     */
    @JvmName("ydbuctxxkavjolse")
    public suspend fun customWebhookTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customWebhookTemplate = mapped
    }

    /**
     * @param value Invoke the hook for deployment events.
     */
    @JvmName("hmgtplrkdybmqmxc")
    public suspend fun deploymentEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentEvents = mapped
    }

    /**
     * @param value Enable SSL verification when invoking the hook.
     */
    @JvmName("iledjaygqrbwpbom")
    public suspend fun enableSslVerification(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableSslVerification = mapped
    }

    /**
     * @param value The full path or id of the group to add the hook to.
     */
    @JvmName("ueaucomgdwnuxgur")
    public suspend fun group(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.group = mapped
    }

    /**
     * @param value Invoke the hook for issues events.
     */
    @JvmName("rcblajxpryawrmvj")
    public suspend fun issuesEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.issuesEvents = mapped
    }

    /**
     * @param value Invoke the hook for job events.
     */
    @JvmName("ctlryxsbjxspgpmg")
    public suspend fun jobEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobEvents = mapped
    }

    /**
     * @param value Invoke the hook for merge requests events.
     */
    @JvmName("esdmboluviljuofv")
    public suspend fun mergeRequestsEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mergeRequestsEvents = mapped
    }

    /**
     * @param value Invoke the hook for note events.
     */
    @JvmName("gmvaktonktylwqxb")
    public suspend fun noteEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noteEvents = mapped
    }

    /**
     * @param value Invoke the hook for pipeline events.
     */
    @JvmName("ucjsgqdnfvjtqigr")
    public suspend fun pipelineEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pipelineEvents = mapped
    }

    /**
     * @param value Invoke the hook for push events.
     */
    @JvmName("fjlnesovtvynvbhe")
    public suspend fun pushEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pushEvents = mapped
    }

    /**
     * @param value Invoke the hook for push events on matching branches only.
     */
    @JvmName("flgbsaauxjbxrnye")
    public suspend fun pushEventsBranchFilter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pushEventsBranchFilter = mapped
    }

    /**
     * @param value Invoke the hook for release events.
     */
    @JvmName("dokhynejqpbasbeg")
    public suspend fun releasesEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.releasesEvents = mapped
    }

    /**
     * @param value Invoke the hook for subgroup events.
     */
    @JvmName("vvnckwwvntrwlqmt")
    public suspend fun subgroupEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subgroupEvents = mapped
    }

    /**
     * @param value Invoke the hook for tag push events.
     */
    @JvmName("phehtmvcgrdixnsr")
    public suspend fun tagPushEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagPushEvents = mapped
    }

    /**
     * @param value A token to present when invoking the hook. The token is not available for imported resources.
     */
    @JvmName("ahvqbwyfkkellnxo")
    public suspend fun token(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.token = mapped
    }

    /**
     * @param value The url of the hook to invoke. Forces re-creation to preserve `token`.
     */
    @JvmName("vmjrvpgwltjaswif")
    public suspend fun url(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.url = mapped
    }

    /**
     * @param value Invoke the hook for wiki page events.
     */
    @JvmName("orvgkbiqwrbnsjqj")
    public suspend fun wikiPageEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.wikiPageEvents = mapped
    }

    internal fun build(): GroupHookArgs = GroupHookArgs(
        confidentialIssuesEvents = confidentialIssuesEvents,
        confidentialNoteEvents = confidentialNoteEvents,
        customHeaders = customHeaders,
        customWebhookTemplate = customWebhookTemplate,
        deploymentEvents = deploymentEvents,
        enableSslVerification = enableSslVerification,
        group = group,
        issuesEvents = issuesEvents,
        jobEvents = jobEvents,
        mergeRequestsEvents = mergeRequestsEvents,
        noteEvents = noteEvents,
        pipelineEvents = pipelineEvents,
        pushEvents = pushEvents,
        pushEventsBranchFilter = pushEventsBranchFilter,
        releasesEvents = releasesEvents,
        subgroupEvents = subgroupEvents,
        tagPushEvents = tagPushEvents,
        token = token,
        url = url,
        wikiPageEvents = wikiPageEvents,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy