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

com.pulumi.gcp.gemini.kotlin.RepositoryGroupArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.gemini.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.gemini.RepositoryGroupArgs.builder
import com.pulumi.gcp.gemini.kotlin.inputs.RepositoryGroupRepositoryArgs
import com.pulumi.gcp.gemini.kotlin.inputs.RepositoryGroupRepositoryArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * ## Import
 * RepositoryGroup can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index}}/repositoryGroups/{{repository_group_id}}`
 * * `{{project}}/{{location}}/{{code_repository_index}}/{{repository_group_id}}`
 * * `{{location}}/{{code_repository_index}}/{{repository_group_id}}`
 * When using the `pulumi import` command, RepositoryGroup can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:gemini/repositoryGroup:RepositoryGroup default projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index}}/repositoryGroups/{{repository_group_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:gemini/repositoryGroup:RepositoryGroup default {{project}}/{{location}}/{{code_repository_index}}/{{repository_group_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:gemini/repositoryGroup:RepositoryGroup default {{location}}/{{code_repository_index}}/{{repository_group_id}}
 * ```
 * @property codeRepositoryIndex Required. Id of the Code Repository Index.
 * @property labels Optional. Labels as key value pairs **Note**: This field is non-authoritative, and will only manage the labels present
 * in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
 * @property location The location of the Code Repository Index, for example `us-central1`.
 * @property project
 * @property repositories Required. List of repositories to group
 * Structure is documented below.
 * @property repositoryGroupId Required. Id of the Repository Group.
 */
public data class RepositoryGroupArgs(
    public val codeRepositoryIndex: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val project: Output? = null,
    public val repositories: Output>? = null,
    public val repositoryGroupId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.gemini.RepositoryGroupArgs =
        com.pulumi.gcp.gemini.RepositoryGroupArgs.builder()
            .codeRepositoryIndex(codeRepositoryIndex?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .repositories(
                repositories?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .repositoryGroupId(repositoryGroupId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RepositoryGroupArgs].
 */
@PulumiTagMarker
public class RepositoryGroupArgsBuilder internal constructor() {
    private var codeRepositoryIndex: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var project: Output? = null

    private var repositories: Output>? = null

    private var repositoryGroupId: Output? = null

    /**
     * @param value Required. Id of the Code Repository Index.
     */
    @JvmName("msnrnfkyfasyumvo")
    public suspend fun codeRepositoryIndex(`value`: Output) {
        this.codeRepositoryIndex = value
    }

    /**
     * @param value Optional. Labels as key value pairs **Note**: This field is non-authoritative, and will only manage the labels present
     * in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("sfnudiycggnrrtxo")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The location of the Code Repository Index, for example `us-central1`.
     */
    @JvmName("olxnbxgwqvnjuvvc")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value
     */
    @JvmName("dvftmhhmhjxfgrki")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Required. List of repositories to group
     * Structure is documented below.
     */
    @JvmName("gmevdsnphcnibsdh")
    public suspend fun repositories(`value`: Output>) {
        this.repositories = value
    }

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

    /**
     * @param values Required. List of repositories to group
     * Structure is documented below.
     */
    @JvmName("ixiqqguxcmvyvkmt")
    public suspend fun repositories(values: List>) {
        this.repositories = Output.all(values)
    }

    /**
     * @param value Required. Id of the Repository Group.
     */
    @JvmName("icsbxuaytwrjikej")
    public suspend fun repositoryGroupId(`value`: Output) {
        this.repositoryGroupId = value
    }

    /**
     * @param value Required. Id of the Code Repository Index.
     */
    @JvmName("eoegcksgmraajyrk")
    public suspend fun codeRepositoryIndex(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.codeRepositoryIndex = mapped
    }

    /**
     * @param value Optional. Labels as key value pairs **Note**: This field is non-authoritative, and will only manage the labels present
     * in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("sedawqtatlbjlqey")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Optional. Labels as key value pairs **Note**: This field is non-authoritative, and will only manage the labels present
     * in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("aheeypyslnpyutwd")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The location of the Code Repository Index, for example `us-central1`.
     */
    @JvmName("ptklesbwcprvwqnr")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    /**
     * @param value Required. List of repositories to group
     * Structure is documented below.
     */
    @JvmName("attydmurxesvxsfu")
    public suspend fun repositories(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.repositories = mapped
    }

    /**
     * @param argument Required. List of repositories to group
     * Structure is documented below.
     */
    @JvmName("sflfjwxwpisnnbtb")
    public suspend fun repositories(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RepositoryGroupRepositoryArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.repositories = mapped
    }

    /**
     * @param argument Required. List of repositories to group
     * Structure is documented below.
     */
    @JvmName("yhhvqoapeimjyunw")
    public suspend fun repositories(vararg argument: suspend RepositoryGroupRepositoryArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RepositoryGroupRepositoryArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.repositories = mapped
    }

    /**
     * @param argument Required. List of repositories to group
     * Structure is documented below.
     */
    @JvmName("mkewxwnwohrijxtp")
    public suspend fun repositories(argument: suspend RepositoryGroupRepositoryArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RepositoryGroupRepositoryArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.repositories = mapped
    }

    /**
     * @param values Required. List of repositories to group
     * Structure is documented below.
     */
    @JvmName("xgtsforgntwuyxbn")
    public suspend fun repositories(vararg values: RepositoryGroupRepositoryArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.repositories = mapped
    }

    /**
     * @param value Required. Id of the Repository Group.
     */
    @JvmName("qosrfwskdcaxkmnl")
    public suspend fun repositoryGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.repositoryGroupId = mapped
    }

    internal fun build(): RepositoryGroupArgs = RepositoryGroupArgs(
        codeRepositoryIndex = codeRepositoryIndex,
        labels = labels,
        location = location,
        project = project,
        repositories = repositories,
        repositoryGroupId = repositoryGroupId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy