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

com.pulumi.gitlab.kotlin.IntegrationJiraArgs.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.IntegrationJiraArgs.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.IntegrationJira` resource allows to manage the lifecycle of a project integration with Jira.
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira)
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gitlab from "@pulumi/gitlab";
 * const awesomeProject = new gitlab.Project("awesome_project", {
 *     name: "awesome_project",
 *     description: "My awesome project.",
 *     visibilityLevel: "public",
 * });
 * const jira = new gitlab.IntegrationJira("jira", {
 *     project: awesomeProject.id,
 *     url: "https://jira.example.com",
 *     username: "user",
 *     password: "mypass",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gitlab as gitlab
 * awesome_project = gitlab.Project("awesome_project",
 *     name="awesome_project",
 *     description="My awesome project.",
 *     visibility_level="public")
 * jira = gitlab.IntegrationJira("jira",
 *     project=awesome_project.id,
 *     url="https://jira.example.com",
 *     username="user",
 *     password="mypass")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using GitLab = Pulumi.GitLab;
 * return await Deployment.RunAsync(() =>
 * {
 *     var awesomeProject = new GitLab.Project("awesome_project", new()
 *     {
 *         Name = "awesome_project",
 *         Description = "My awesome project.",
 *         VisibilityLevel = "public",
 *     });
 *     var jira = new GitLab.IntegrationJira("jira", new()
 *     {
 *         Project = awesomeProject.Id,
 *         Url = "https://jira.example.com",
 *         Username = "user",
 *         Password = "mypass",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		awesomeProject, err := gitlab.NewProject(ctx, "awesome_project", &gitlab.ProjectArgs{
 * 			Name:            pulumi.String("awesome_project"),
 * 			Description:     pulumi.String("My awesome project."),
 * 			VisibilityLevel: pulumi.String("public"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = gitlab.NewIntegrationJira(ctx, "jira", &gitlab.IntegrationJiraArgs{
 * 			Project:  awesomeProject.ID(),
 * 			Url:      pulumi.String("https://jira.example.com"),
 * 			Username: pulumi.String("user"),
 * 			Password: pulumi.String("mypass"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gitlab.Project;
 * import com.pulumi.gitlab.ProjectArgs;
 * import com.pulumi.gitlab.IntegrationJira;
 * import com.pulumi.gitlab.IntegrationJiraArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var awesomeProject = new Project("awesomeProject", ProjectArgs.builder()
 *             .name("awesome_project")
 *             .description("My awesome project.")
 *             .visibilityLevel("public")
 *             .build());
 *         var jira = new IntegrationJira("jira", IntegrationJiraArgs.builder()
 *             .project(awesomeProject.id())
 *             .url("https://jira.example.com")
 *             .username("user")
 *             .password("mypass")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   awesomeProject:
 *     type: gitlab:Project
 *     name: awesome_project
 *     properties:
 *       name: awesome_project
 *       description: My awesome project.
 *       visibilityLevel: public
 *   jira:
 *     type: gitlab:IntegrationJira
 *     properties:
 *       project: ${awesomeProject.id}
 *       url: https://jira.example.com
 *       username: user
 *       password: mypass
 * ```
 * 
 * ## Import
 * You can import a gitlab_integration_jira state using the project ID, e.g.
 * ```sh
 * $ pulumi import gitlab:index/integrationJira:IntegrationJira jira 1
 * ```
 * @property apiUrl The base URL to the Jira instance API. Web URL value is used if not set. For example, https://jira-api.example.com.
 * @property commentOnEventEnabled Enable comments inside Jira issues on each GitLab event (commit / merge request)
 * @property commitEvents Enable notifications for commit events
 * @property issuesEvents Enable notifications for issues events.
 * @property jiraIssueTransitionId The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (Administration > Issues > Workflows) by selecting View under Operations of the desired workflow of your project. By default, this ID is set to 2. *Note**: importing this field is only supported since GitLab 15.2.
 * @property jobEvents Enable notifications for job events.
 * @property mergeRequestsEvents Enable notifications for merge request events
 * @property noteEvents Enable notifications for note events.
 * @property password The password of the user created to be used with GitLab/JIRA.
 * @property pipelineEvents Enable notifications for pipeline events.
 * @property project ID of the project you want to activate integration on.
 * @property projectKey The short identifier for your JIRA project, all uppercase, e.g., PROJ.
 * @property pushEvents Enable notifications for push events.
 * @property tagPushEvents Enable notifications for tag_push events.
 * @property url The URL to the JIRA project which is being linked to this GitLab project. For example, https://jira.example.com.
 * @property username The username of the user created to be used with GitLab/JIRA.
 */
public data class IntegrationJiraArgs(
    public val apiUrl: Output? = null,
    public val commentOnEventEnabled: Output? = null,
    public val commitEvents: Output? = null,
    public val issuesEvents: Output? = null,
    public val jiraIssueTransitionId: Output? = null,
    public val jobEvents: Output? = null,
    public val mergeRequestsEvents: Output? = null,
    public val noteEvents: Output? = null,
    public val password: Output? = null,
    public val pipelineEvents: Output? = null,
    public val project: Output? = null,
    public val projectKey: Output? = null,
    public val pushEvents: Output? = null,
    public val tagPushEvents: Output? = null,
    public val url: Output? = null,
    public val username: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.IntegrationJiraArgs =
        com.pulumi.gitlab.IntegrationJiraArgs.builder()
            .apiUrl(apiUrl?.applyValue({ args0 -> args0 }))
            .commentOnEventEnabled(commentOnEventEnabled?.applyValue({ args0 -> args0 }))
            .commitEvents(commitEvents?.applyValue({ args0 -> args0 }))
            .issuesEvents(issuesEvents?.applyValue({ args0 -> args0 }))
            .jiraIssueTransitionId(jiraIssueTransitionId?.applyValue({ args0 -> args0 }))
            .jobEvents(jobEvents?.applyValue({ args0 -> args0 }))
            .mergeRequestsEvents(mergeRequestsEvents?.applyValue({ args0 -> args0 }))
            .noteEvents(noteEvents?.applyValue({ args0 -> args0 }))
            .password(password?.applyValue({ args0 -> args0 }))
            .pipelineEvents(pipelineEvents?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .projectKey(projectKey?.applyValue({ args0 -> args0 }))
            .pushEvents(pushEvents?.applyValue({ args0 -> args0 }))
            .tagPushEvents(tagPushEvents?.applyValue({ args0 -> args0 }))
            .url(url?.applyValue({ args0 -> args0 }))
            .username(username?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IntegrationJiraArgs].
 */
@PulumiTagMarker
public class IntegrationJiraArgsBuilder internal constructor() {
    private var apiUrl: Output? = null

    private var commentOnEventEnabled: Output? = null

    private var commitEvents: Output? = null

    private var issuesEvents: Output? = null

    private var jiraIssueTransitionId: Output? = null

    private var jobEvents: Output? = null

    private var mergeRequestsEvents: Output? = null

    private var noteEvents: Output? = null

    private var password: Output? = null

    private var pipelineEvents: Output? = null

    private var project: Output? = null

    private var projectKey: Output? = null

    private var pushEvents: Output? = null

    private var tagPushEvents: Output? = null

    private var url: Output? = null

    private var username: Output? = null

    /**
     * @param value The base URL to the Jira instance API. Web URL value is used if not set. For example, https://jira-api.example.com.
     */
    @JvmName("fxoxhgehlpgkqtaq")
    public suspend fun apiUrl(`value`: Output) {
        this.apiUrl = value
    }

    /**
     * @param value Enable comments inside Jira issues on each GitLab event (commit / merge request)
     */
    @JvmName("igefsynyriqhpynj")
    public suspend fun commentOnEventEnabled(`value`: Output) {
        this.commentOnEventEnabled = value
    }

    /**
     * @param value Enable notifications for commit events
     */
    @JvmName("ocrxcwnhbnetlmyg")
    public suspend fun commitEvents(`value`: Output) {
        this.commitEvents = value
    }

    /**
     * @param value Enable notifications for issues events.
     */
    @JvmName("vpsgidfjyvderkgv")
    public suspend fun issuesEvents(`value`: Output) {
        this.issuesEvents = value
    }

    /**
     * @param value The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (Administration > Issues > Workflows) by selecting View under Operations of the desired workflow of your project. By default, this ID is set to 2. *Note**: importing this field is only supported since GitLab 15.2.
     */
    @JvmName("lksflsmmficxgfqy")
    public suspend fun jiraIssueTransitionId(`value`: Output) {
        this.jiraIssueTransitionId = value
    }

    /**
     * @param value Enable notifications for job events.
     */
    @JvmName("cncjdrukrjuptarw")
    public suspend fun jobEvents(`value`: Output) {
        this.jobEvents = value
    }

    /**
     * @param value Enable notifications for merge request events
     */
    @JvmName("eumecwbjvhjhjswp")
    public suspend fun mergeRequestsEvents(`value`: Output) {
        this.mergeRequestsEvents = value
    }

    /**
     * @param value Enable notifications for note events.
     */
    @JvmName("mixksnfklvnispui")
    public suspend fun noteEvents(`value`: Output) {
        this.noteEvents = value
    }

    /**
     * @param value The password of the user created to be used with GitLab/JIRA.
     */
    @JvmName("rkeoghrbmdqlcjdo")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value Enable notifications for pipeline events.
     */
    @JvmName("souqfcjquharmibm")
    public suspend fun pipelineEvents(`value`: Output) {
        this.pipelineEvents = value
    }

    /**
     * @param value ID of the project you want to activate integration on.
     */
    @JvmName("mrepmwtgliibyosu")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The short identifier for your JIRA project, all uppercase, e.g., PROJ.
     */
    @JvmName("gqybuytivhdggytk")
    public suspend fun projectKey(`value`: Output) {
        this.projectKey = value
    }

    /**
     * @param value Enable notifications for push events.
     */
    @JvmName("ihqgksrvhjdsmsqn")
    public suspend fun pushEvents(`value`: Output) {
        this.pushEvents = value
    }

    /**
     * @param value Enable notifications for tag_push events.
     */
    @JvmName("oxcgsfabhpatcxhf")
    public suspend fun tagPushEvents(`value`: Output) {
        this.tagPushEvents = value
    }

    /**
     * @param value The URL to the JIRA project which is being linked to this GitLab project. For example, https://jira.example.com.
     */
    @JvmName("yhcljqgyrvybvvro")
    public suspend fun url(`value`: Output) {
        this.url = value
    }

    /**
     * @param value The username of the user created to be used with GitLab/JIRA.
     */
    @JvmName("jeowffbttqvwrbrx")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value The base URL to the Jira instance API. Web URL value is used if not set. For example, https://jira-api.example.com.
     */
    @JvmName("krjymtqnkqhjueyf")
    public suspend fun apiUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiUrl = mapped
    }

    /**
     * @param value Enable comments inside Jira issues on each GitLab event (commit / merge request)
     */
    @JvmName("uydqipedtavysbjh")
    public suspend fun commentOnEventEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commentOnEventEnabled = mapped
    }

    /**
     * @param value Enable notifications for commit events
     */
    @JvmName("qxqujbkgeglrudaa")
    public suspend fun commitEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commitEvents = mapped
    }

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

    /**
     * @param value The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (Administration > Issues > Workflows) by selecting View under Operations of the desired workflow of your project. By default, this ID is set to 2. *Note**: importing this field is only supported since GitLab 15.2.
     */
    @JvmName("rweotueunymjvydq")
    public suspend fun jiraIssueTransitionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jiraIssueTransitionId = mapped
    }

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

    /**
     * @param value Enable notifications for merge request events
     */
    @JvmName("habjakgybvrppfgc")
    public suspend fun mergeRequestsEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mergeRequestsEvents = mapped
    }

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

    /**
     * @param value The password of the user created to be used with GitLab/JIRA.
     */
    @JvmName("qexxmxtmldmpubvo")
    public suspend fun password(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.password = mapped
    }

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

    /**
     * @param value ID of the project you want to activate integration on.
     */
    @JvmName("fmpntwodxqlibntt")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The short identifier for your JIRA project, all uppercase, e.g., PROJ.
     */
    @JvmName("huymnthtkhujvomw")
    public suspend fun projectKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.projectKey = mapped
    }

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

    /**
     * @param value Enable notifications for tag_push events.
     */
    @JvmName("qsbbbrxkaimpqppx")
    public suspend fun tagPushEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagPushEvents = mapped
    }

    /**
     * @param value The URL to the JIRA project which is being linked to this GitLab project. For example, https://jira.example.com.
     */
    @JvmName("oxvrslekbjxxbjyv")
    public suspend fun url(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.url = mapped
    }

    /**
     * @param value The username of the user created to be used with GitLab/JIRA.
     */
    @JvmName("lqbdmaiocmgoqnlf")
    public suspend fun username(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.username = mapped
    }

    internal fun build(): IntegrationJiraArgs = IntegrationJiraArgs(
        apiUrl = apiUrl,
        commentOnEventEnabled = commentOnEventEnabled,
        commitEvents = commitEvents,
        issuesEvents = issuesEvents,
        jiraIssueTransitionId = jiraIssueTransitionId,
        jobEvents = jobEvents,
        mergeRequestsEvents = mergeRequestsEvents,
        noteEvents = noteEvents,
        password = password,
        pipelineEvents = pipelineEvents,
        project = project,
        projectKey = projectKey,
        pushEvents = pushEvents,
        tagPushEvents = tagPushEvents,
        url = url,
        username = username,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy