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

com.pulumi.gitlab.kotlin.ProjectIssueArgs.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.ProjectIssueArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gitlab from "@pulumi/gitlab";
 * const foo = new gitlab.Project("foo", {
 *     name: "example project",
 *     description: "Lorem Ipsum",
 *     visibilityLevel: "public",
 * });
 * const welcomeIssue = new gitlab.ProjectIssue("welcome_issue", {
 *     project: foo.id,
 *     title: "Welcome!",
 *     description: pulumi.interpolate`  Welcome to the ${foo.name} project!
 * `,
 *     discussionLocked: true,
 * });
 * export const welcomeIssueWebUrl = webUrl;
 * ```
 * ```python
 * import pulumi
 * import pulumi_gitlab as gitlab
 * foo = gitlab.Project("foo",
 *     name="example project",
 *     description="Lorem Ipsum",
 *     visibility_level="public")
 * welcome_issue = gitlab.ProjectIssue("welcome_issue",
 *     project=foo.id,
 *     title="Welcome!",
 *     description=foo.name.apply(lambda name: f"""  Welcome to the {name} project!
 * """),
 *     discussion_locked=True)
 * pulumi.export("welcomeIssueWebUrl", web_url)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using GitLab = Pulumi.GitLab;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foo = new GitLab.Project("foo", new()
 *     {
 *         Name = "example project",
 *         Description = "Lorem Ipsum",
 *         VisibilityLevel = "public",
 *     });
 *     var welcomeIssue = new GitLab.ProjectIssue("welcome_issue", new()
 *     {
 *         Project = foo.Id,
 *         Title = "Welcome!",
 *         Description = foo.Name.Apply(name => @$"  Welcome to the {name} project!
 * "),
 *         DiscussionLocked = true,
 *     });
 *     return new Dictionary
 *     {
 *         ["welcomeIssueWebUrl"] = webUrl,
 *     };
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"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 {
 * 		foo, err := gitlab.NewProject(ctx, "foo", &gitlab.ProjectArgs{
 * 			Name:            pulumi.String("example project"),
 * 			Description:     pulumi.String("Lorem Ipsum"),
 * 			VisibilityLevel: pulumi.String("public"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = gitlab.NewProjectIssue(ctx, "welcome_issue", &gitlab.ProjectIssueArgs{
 * 			Project: foo.ID(),
 * 			Title:   pulumi.String("Welcome!"),
 * 			Description: foo.Name.ApplyT(func(name string) (string, error) {
 * 				return fmt.Sprintf("  Welcome to the %v project!\n\n", name), nil
 * 			}).(pulumi.StringOutput),
 * 			DiscussionLocked: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		ctx.Export("welcomeIssueWebUrl", webUrl)
 * 		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.ProjectIssue;
 * import com.pulumi.gitlab.ProjectIssueArgs;
 * 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 foo = new Project("foo", ProjectArgs.builder()
 *             .name("example project")
 *             .description("Lorem Ipsum")
 *             .visibilityLevel("public")
 *             .build());
 *         var welcomeIssue = new ProjectIssue("welcomeIssue", ProjectIssueArgs.builder()
 *             .project(foo.id())
 *             .title("Welcome!")
 *             .description(foo.name().applyValue(name -> """
 *   Welcome to the %s project!
 * ", name)))
 *             .discussionLocked(true)
 *             .build());
 *         ctx.export("welcomeIssueWebUrl", webUrl);
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foo:
 *     type: gitlab:Project
 *     properties:
 *       name: example project
 *       description: Lorem Ipsum
 *       visibilityLevel: public
 *   welcomeIssue:
 *     type: gitlab:ProjectIssue
 *     name: welcome_issue
 *     properties:
 *       project: ${foo.id}
 *       title: Welcome!
 *       description: |2+
 *           Welcome to the ${foo.name} project!
 *       discussionLocked: true
 * outputs:
 *   welcomeIssueWebUrl: ${webUrl}
 * ```
 * 
 * ## Import
 * You can import this resource with an id made up of `{project-id}:{issue-id}`, e.g.
 * ```sh
 * $ pulumi import gitlab:index/projectIssue:ProjectIssue welcome_issue 42:1
 * ```
 * @property assigneeIds The IDs of the users to assign the issue to.
 * @property confidential Set an issue to be confidential.
 * @property createdAt When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
 * @property deleteOnDestroy Whether the issue is deleted instead of closed during destroy.
 * @property description The description of an issue. Limited to 1,048,576 characters.
 * @property discussionLocked Whether the issue is locked for discussions or not.
 * @property discussionToResolve The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with merge*request*to*resolve*discussions_of.
 * @property dueDate The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
 * @property epicIssueId The ID of the epic issue.
 * @property iid The internal ID of the project's issue.
 * @property issueType The type of issue. Valid values are: `issue`, `incident`, `test_case`.
 * @property labels The labels of an issue.
 * @property mergeRequestToResolveDiscussionsOf The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
 * @property milestoneId The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
 * @property project The name or ID of the project.
 * @property state The state of the issue. Valid values are: `opened`, `closed`.
 * @property title The title of the issue.
 * @property updatedAt When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
 * @property weight The weight of the issue. Valid values are greater than or equal to 0.
 */
public data class ProjectIssueArgs(
    public val assigneeIds: Output>? = null,
    public val confidential: Output? = null,
    public val createdAt: Output? = null,
    public val deleteOnDestroy: Output? = null,
    public val description: Output? = null,
    public val discussionLocked: Output? = null,
    public val discussionToResolve: Output? = null,
    public val dueDate: Output? = null,
    public val epicIssueId: Output? = null,
    public val iid: Output? = null,
    public val issueType: Output? = null,
    public val labels: Output>? = null,
    public val mergeRequestToResolveDiscussionsOf: Output? = null,
    public val milestoneId: Output? = null,
    public val project: Output? = null,
    public val state: Output? = null,
    public val title: Output? = null,
    public val updatedAt: Output? = null,
    public val weight: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.ProjectIssueArgs =
        com.pulumi.gitlab.ProjectIssueArgs.builder()
            .assigneeIds(assigneeIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .confidential(confidential?.applyValue({ args0 -> args0 }))
            .createdAt(createdAt?.applyValue({ args0 -> args0 }))
            .deleteOnDestroy(deleteOnDestroy?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .discussionLocked(discussionLocked?.applyValue({ args0 -> args0 }))
            .discussionToResolve(discussionToResolve?.applyValue({ args0 -> args0 }))
            .dueDate(dueDate?.applyValue({ args0 -> args0 }))
            .epicIssueId(epicIssueId?.applyValue({ args0 -> args0 }))
            .iid(iid?.applyValue({ args0 -> args0 }))
            .issueType(issueType?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .mergeRequestToResolveDiscussionsOf(
                mergeRequestToResolveDiscussionsOf?.applyValue({ args0 ->
                    args0
                }),
            )
            .milestoneId(milestoneId?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .state(state?.applyValue({ args0 -> args0 }))
            .title(title?.applyValue({ args0 -> args0 }))
            .updatedAt(updatedAt?.applyValue({ args0 -> args0 }))
            .weight(weight?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ProjectIssueArgs].
 */
@PulumiTagMarker
public class ProjectIssueArgsBuilder internal constructor() {
    private var assigneeIds: Output>? = null

    private var confidential: Output? = null

    private var createdAt: Output? = null

    private var deleteOnDestroy: Output? = null

    private var description: Output? = null

    private var discussionLocked: Output? = null

    private var discussionToResolve: Output? = null

    private var dueDate: Output? = null

    private var epicIssueId: Output? = null

    private var iid: Output? = null

    private var issueType: Output? = null

    private var labels: Output>? = null

    private var mergeRequestToResolveDiscussionsOf: Output? = null

    private var milestoneId: Output? = null

    private var project: Output? = null

    private var state: Output? = null

    private var title: Output? = null

    private var updatedAt: Output? = null

    private var weight: Output? = null

    /**
     * @param value The IDs of the users to assign the issue to.
     */
    @JvmName("qmcnephjmbktttgo")
    public suspend fun assigneeIds(`value`: Output>) {
        this.assigneeIds = value
    }

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

    /**
     * @param values The IDs of the users to assign the issue to.
     */
    @JvmName("alujmtbpykywhoja")
    public suspend fun assigneeIds(values: List>) {
        this.assigneeIds = Output.all(values)
    }

    /**
     * @param value Set an issue to be confidential.
     */
    @JvmName("dupmaqpfubedghhu")
    public suspend fun confidential(`value`: Output) {
        this.confidential = value
    }

    /**
     * @param value When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
     */
    @JvmName("okofaimsrixsyhac")
    public suspend fun createdAt(`value`: Output) {
        this.createdAt = value
    }

    /**
     * @param value Whether the issue is deleted instead of closed during destroy.
     */
    @JvmName("oejflctwcvkxrxad")
    public suspend fun deleteOnDestroy(`value`: Output) {
        this.deleteOnDestroy = value
    }

    /**
     * @param value The description of an issue. Limited to 1,048,576 characters.
     */
    @JvmName("oiluwicxddwxvgbp")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Whether the issue is locked for discussions or not.
     */
    @JvmName("gkbjkvcrltvpbpcr")
    public suspend fun discussionLocked(`value`: Output) {
        this.discussionLocked = value
    }

    /**
     * @param value The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with merge*request*to*resolve*discussions_of.
     */
    @JvmName("cwvjlerwpsoubapv")
    public suspend fun discussionToResolve(`value`: Output) {
        this.discussionToResolve = value
    }

    /**
     * @param value The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
     */
    @JvmName("iiqrmbslwnipsxql")
    public suspend fun dueDate(`value`: Output) {
        this.dueDate = value
    }

    /**
     * @param value The ID of the epic issue.
     */
    @JvmName("eygcvoakfweqleij")
    public suspend fun epicIssueId(`value`: Output) {
        this.epicIssueId = value
    }

    /**
     * @param value The internal ID of the project's issue.
     */
    @JvmName("psjixdqphdbccamw")
    public suspend fun iid(`value`: Output) {
        this.iid = value
    }

    /**
     * @param value The type of issue. Valid values are: `issue`, `incident`, `test_case`.
     */
    @JvmName("xudynymtjrpppkgx")
    public suspend fun issueType(`value`: Output) {
        this.issueType = value
    }

    /**
     * @param value The labels of an issue.
     */
    @JvmName("lwrcneuethtprksj")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

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

    /**
     * @param values The labels of an issue.
     */
    @JvmName("ckgfxntymxcqewxg")
    public suspend fun labels(values: List>) {
        this.labels = Output.all(values)
    }

    /**
     * @param value The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
     */
    @JvmName("hngdtodqrygmnmqn")
    public suspend fun mergeRequestToResolveDiscussionsOf(`value`: Output) {
        this.mergeRequestToResolveDiscussionsOf = value
    }

    /**
     * @param value The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
     */
    @JvmName("nwombccmutnrkosg")
    public suspend fun milestoneId(`value`: Output) {
        this.milestoneId = value
    }

    /**
     * @param value The name or ID of the project.
     */
    @JvmName("clsvcxjdihrqjqas")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The state of the issue. Valid values are: `opened`, `closed`.
     */
    @JvmName("pkadpyhhvipupgdk")
    public suspend fun state(`value`: Output) {
        this.state = value
    }

    /**
     * @param value The title of the issue.
     */
    @JvmName("wfybcwvwfkmtsomb")
    public suspend fun title(`value`: Output) {
        this.title = value
    }

    /**
     * @param value When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
     */
    @JvmName("ussewjnytqmiwgit")
    public suspend fun updatedAt(`value`: Output) {
        this.updatedAt = value
    }

    /**
     * @param value The weight of the issue. Valid values are greater than or equal to 0.
     */
    @JvmName("cccrmlgnmdivcxby")
    public suspend fun weight(`value`: Output) {
        this.weight = value
    }

    /**
     * @param value The IDs of the users to assign the issue to.
     */
    @JvmName("iapocabmyhljjtty")
    public suspend fun assigneeIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.assigneeIds = mapped
    }

    /**
     * @param values The IDs of the users to assign the issue to.
     */
    @JvmName("mgytvehwwwikohvw")
    public suspend fun assigneeIds(vararg values: Int) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.assigneeIds = mapped
    }

    /**
     * @param value Set an issue to be confidential.
     */
    @JvmName("csfomqbrwemjvwaf")
    public suspend fun confidential(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.confidential = mapped
    }

    /**
     * @param value When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
     */
    @JvmName("jgrjhevuvfuwpuxq")
    public suspend fun createdAt(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createdAt = mapped
    }

    /**
     * @param value Whether the issue is deleted instead of closed during destroy.
     */
    @JvmName("lnmamadyavufqnfl")
    public suspend fun deleteOnDestroy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteOnDestroy = mapped
    }

    /**
     * @param value The description of an issue. Limited to 1,048,576 characters.
     */
    @JvmName("oxckdsgcerdsfqom")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Whether the issue is locked for discussions or not.
     */
    @JvmName("mlhyqjlrdkjydfio")
    public suspend fun discussionLocked(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.discussionLocked = mapped
    }

    /**
     * @param value The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with merge*request*to*resolve*discussions_of.
     */
    @JvmName("pbwtexpfrntjujvq")
    public suspend fun discussionToResolve(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.discussionToResolve = mapped
    }

    /**
     * @param value The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
     */
    @JvmName("urkmjdlphimfckmi")
    public suspend fun dueDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dueDate = mapped
    }

    /**
     * @param value The ID of the epic issue.
     */
    @JvmName("rbbvlykcynnvwgss")
    public suspend fun epicIssueId(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.epicIssueId = mapped
    }

    /**
     * @param value The internal ID of the project's issue.
     */
    @JvmName("oehpxybrtblkhbot")
    public suspend fun iid(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iid = mapped
    }

    /**
     * @param value The type of issue. Valid values are: `issue`, `incident`, `test_case`.
     */
    @JvmName("hunsnvphnsyewloa")
    public suspend fun issueType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.issueType = mapped
    }

    /**
     * @param value The labels of an issue.
     */
    @JvmName("ejomggrqqdqkthhr")
    public suspend fun labels(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values The labels of an issue.
     */
    @JvmName("asgjugbovqirvgse")
    public suspend fun labels(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
     */
    @JvmName("imvndljusdklbjrw")
    public suspend fun mergeRequestToResolveDiscussionsOf(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mergeRequestToResolveDiscussionsOf = mapped
    }

    /**
     * @param value The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
     */
    @JvmName("kfqwpdojkhfbqbnr")
    public suspend fun milestoneId(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.milestoneId = mapped
    }

    /**
     * @param value The name or ID of the project.
     */
    @JvmName("yxwbomiragtcegkt")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The state of the issue. Valid values are: `opened`, `closed`.
     */
    @JvmName("rdovjaikhtkmqcnr")
    public suspend fun state(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value The title of the issue.
     */
    @JvmName("elavhbhportnwbog")
    public suspend fun title(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.title = mapped
    }

    /**
     * @param value When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
     */
    @JvmName("wmctjlqvgifjjxqt")
    public suspend fun updatedAt(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.updatedAt = mapped
    }

    /**
     * @param value The weight of the issue. Valid values are greater than or equal to 0.
     */
    @JvmName("eyolvxltkvkdlwqe")
    public suspend fun weight(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weight = mapped
    }

    internal fun build(): ProjectIssueArgs = ProjectIssueArgs(
        assigneeIds = assigneeIds,
        confidential = confidential,
        createdAt = createdAt,
        deleteOnDestroy = deleteOnDestroy,
        description = description,
        discussionLocked = discussionLocked,
        discussionToResolve = discussionToResolve,
        dueDate = dueDate,
        epicIssueId = epicIssueId,
        iid = iid,
        issueType = issueType,
        labels = labels,
        mergeRequestToResolveDiscussionsOf = mergeRequestToResolveDiscussionsOf,
        milestoneId = milestoneId,
        project = project,
        state = state,
        title = title,
        updatedAt = updatedAt,
        weight = weight,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy