com.pulumi.gitlab.kotlin.TopicArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gitlab-kotlin Show documentation
Show all versions of pulumi-gitlab-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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("puukvmufpiksjevt")
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("odqjsaoiyniwwwcu")
public suspend fun avatarHash(`value`: Output) {
this.avatarHash = value
}
/**
* @param value A text describing the topic.
*/
@JvmName("bjmorwodsobleqjl")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The topic's name.
*/
@JvmName("rtxmfdqishkxgogt")
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("xbjqnissnesfdmxq")
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("tmxeqqeswxnucuwx")
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("yrfmteqnhlwwbkac")
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("qpdogaotfhjuyuyp")
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("yromffrmfoockikj")
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("jvjwiehciunlpjxy")
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("cjhritskupugpfxf")
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("idltfingbeqfggxt")
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,
)
}