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

com.pulumi.gitlab.kotlin.TopicArgs.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.TopicArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The `gitlab.Topic` resource allows to manage the lifecycle of topics that are then assignable to projects.
 * > Topics are the successors for project tags. Aside from avoiding terminology collisions with Git tags, they are more descriptive and better searchable.
 * > Deleting a topic was implemented in GitLab 14.9. For older versions of GitLab set `soft_destroy = true` to empty out a topic instead of deleting it.
 * **Upstream API**: [GitLab REST API docs for topics](https://docs.gitlab.com/ee/api/topics.html)
 * ## Import
 * ```sh
 * $ pulumi import gitlab:index/topic:Topic You can import a topic to terraform state using ` `.
 * ```
 * The `id` must be an integer for the id of the topic you want to import,
 * for example:
 * ```sh
 * $ pulumi import gitlab:index/topic:Topic functional_programming 1
 * ```
 * @property avatar A local path to the avatar image to upload. **Note**: not available for imported resources.
 * @property avatarHash The hash of the avatar image. Use `filesha256("path/to/avatar.png")` whenever possible. **Note**: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
 * @property description A text describing the topic.
 * @property name The topic's name.
 * @property softDestroy Empty the topics fields instead of deleting it.
 * @property title The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
 */
public data class TopicArgs(
    public val avatar: Output? = null,
    public val avatarHash: Output? = null,
    public val description: Output? = null,
    public val name: Output? = null,
    @Deprecated(
        message = """
  GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.
  """,
    )
    public val softDestroy: Output? = null,
    public val title: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.TopicArgs = com.pulumi.gitlab.TopicArgs.builder()
        .avatar(avatar?.applyValue({ args0 -> args0 }))
        .avatarHash(avatarHash?.applyValue({ args0 -> args0 }))
        .description(description?.applyValue({ args0 -> args0 }))
        .name(name?.applyValue({ args0 -> args0 }))
        .softDestroy(softDestroy?.applyValue({ args0 -> args0 }))
        .title(title?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TopicArgs].
 */
@PulumiTagMarker
public class TopicArgsBuilder internal constructor() {
    private var avatar: Output? = null

    private var avatarHash: Output? = null

    private var description: Output? = null

    private var name: Output? = null

    private var softDestroy: Output? = null

    private var title: Output? = null

    /**
     * @param value A local path to the avatar image to upload. **Note**: not available for imported resources.
     */
    @JvmName("xyhuekntuhvgqemh")
    public suspend fun avatar(`value`: Output) {
        this.avatar = value
    }

    /**
     * @param value The hash of the avatar image. Use `filesha256("path/to/avatar.png")` whenever possible. **Note**: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
     */
    @JvmName("ujbvdwbiucjciqqi")
    public suspend fun avatarHash(`value`: Output) {
        this.avatarHash = value
    }

    /**
     * @param value A text describing the topic.
     */
    @JvmName("nfvvlweldtedtnss")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The topic's name.
     */
    @JvmName("iwmejxlmpesxcpsu")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Empty the topics fields instead of deleting it.
     */
    @Deprecated(
        message = """
  GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.
  """,
    )
    @JvmName("srmemkaaxsyfungm")
    public suspend fun softDestroy(`value`: Output) {
        this.softDestroy = value
    }

    /**
     * @param value The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
     */
    @JvmName("gemotuhbbkoinhuh")
    public suspend fun title(`value`: Output) {
        this.title = value
    }

    /**
     * @param value A local path to the avatar image to upload. **Note**: not available for imported resources.
     */
    @JvmName("yfpsdyffksdaifmu")
    public suspend fun avatar(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.avatar = mapped
    }

    /**
     * @param value The hash of the avatar image. Use `filesha256("path/to/avatar.png")` whenever possible. **Note**: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
     */
    @JvmName("fgfnawkinwqlyejd")
    public suspend fun avatarHash(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.avatarHash = mapped
    }

    /**
     * @param value A text describing the topic.
     */
    @JvmName("umrqnhrpmbmgiyqj")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The topic's name.
     */
    @JvmName("hojxwluhnuxmntac")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Empty the topics fields instead of deleting it.
     */
    @Deprecated(
        message = """
  GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.
  """,
    )
    @JvmName("nltnejtaumovufln")
    public suspend fun softDestroy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.softDestroy = mapped
    }

    /**
     * @param value The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
     */
    @JvmName("thuccotyiwvmpeqr")
    public suspend fun title(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.title = mapped
    }

    internal fun build(): TopicArgs = TopicArgs(
        avatar = avatar,
        avatarHash = avatarHash,
        description = description,
        name = name,
        softDestroy = softDestroy,
        title = title,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy