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

com.pulumi.gitlab.kotlin.ServiceJiraArgs.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.ServiceJiraArgs.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.ServiceJira` resource allows to manage the lifecycle of a project integration with Jira.
 * > This resource is deprecated. use `gitlab.IntegrationJira`instead!
 * **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.ServiceJira("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.ServiceJira("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.ServiceJira("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.NewServiceJira(ctx, "jira", &gitlab.ServiceJiraArgs{
 * 			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.ServiceJira;
 * import com.pulumi.gitlab.ServiceJiraArgs;
 * 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 ServiceJira("jira", ServiceJiraArgs.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:ServiceJira
 *     properties:
 *       project: ${awesomeProject.id}
 *       url: https://jira.example.com
 *       username: user
 *       password: mypass
 * ```
 * 
 * ## Import
 * You can import a gitlab_service_jira state using the project ID, e.g.
 * ```sh
 * $ pulumi import gitlab:index/serviceJira:ServiceJira 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 ServiceJiraArgs(
    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.ServiceJiraArgs =
        com.pulumi.gitlab.ServiceJiraArgs.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 [ServiceJiraArgs].
 */
@PulumiTagMarker
public class ServiceJiraArgsBuilder 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("nhdlnbwhxkqhcvmy")
    public suspend fun apiUrl(`value`: Output) {
        this.apiUrl = value
    }

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

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

    /**
     * @param value Enable notifications for issues events.
     */
    @JvmName("hrojyseaxqvawrfc")
    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("sjcoarhilcwrxkpw")
    public suspend fun jiraIssueTransitionId(`value`: Output) {
        this.jiraIssueTransitionId = value
    }

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

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

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

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

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

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

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

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

    /**
     * @param value Enable notifications for tag_push events.
     */
    @JvmName("mphfcsgqfnuaaoew")
    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("cuncpohnmbjbyttn")
    public suspend fun url(`value`: Output) {
        this.url = value
    }

    /**
     * @param value The username of the user created to be used with GitLab/JIRA.
     */
    @JvmName("tnpgoybpnmaxxfaj")
    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("srjmthhvotymvteu")
    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("qcxyvhyibhmwiwih")
    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("vcxwgdghifoochyu")
    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("kjxfhcsdsvqfdjir")
    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("fkgmolqxrbanjdom")
    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("jwiwgqrllanvxbbo")
    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("pdcopnovraqibshd")
    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("igorglfqurxggpay")
    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("yepdvtwompbqllxq")
    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("brjqlhxfiopyghxk")
    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("irtdiyrjaexomsvn")
    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("xoidbeqpbefcrdby")
    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("kxamgbawvhpplkcy")
    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("aldegvoaghsjbujm")
    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("vhlllkmaypdnqopg")
    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("cngdrcpsjkxtolip")
    public suspend fun username(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.username = mapped
    }

    internal fun build(): ServiceJiraArgs = ServiceJiraArgs(
        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