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

com.pulumi.gcp.developerconnect.kotlin.GitRepositoryLinkArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.developerconnect.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.developerconnect.GitRepositoryLinkArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * ### Developer Connect Git Repository Link Github Doc
 * 
 * ```yaml
 * resources:
 *   github-token-secret:
 *     type: gcp:secretmanager:Secret
 *     properties:
 *       secretId: github-token-secret
 *       replication:
 *         auto: {}
 *   github-token-secret-version:
 *     type: gcp:secretmanager:SecretVersion
 *     properties:
 *       secret: ${["github-token-secret"].id}
 *       secretData:
 *         fn::invoke:
 *           function: std:file
 *           arguments:
 *             input: my-github-token.txt
 *           return: result
 *   policy:
 *     type: gcp:secretmanager:SecretIamPolicy
 *     properties:
 *       secretId: ${["github-token-secret"].secretId}
 *       policyData: ${["p4sa-secretAccessor"].policyData}
 *   my-connection:
 *     type: gcp:developerconnect:Connection
 *     properties:
 *       location: us-central1
 *       connectionId: my-connection
 *       githubConfig:
 *         githubApp: DEVELOPER_CONNECT
 *         appInstallationId: 123123
 *         authorizerCredential:
 *           oauthTokenSecretVersion: ${["github-token-secret-version"].id}
 *   my-repository:
 *     type: gcp:developerconnect:GitRepositoryLink
 *     properties:
 *       location: us-central1
 *       gitRepositoryLinkId: my-repo
 *       parentConnection: ${["my-connection"].connectionId}
 *       remoteUri: https://github.com/myuser/myrepo.git
 * variables:
 *   p4sa-secretAccessor:
 *     fn::invoke:
 *       function: gcp:organizations:getIAMPolicy
 *       arguments:
 *         bindings:
 *           - role: roles/secretmanager.secretAccessor
 *             members:
 *               - serviceAccount:[email protected]
 * ```
 * 
 * ## Import
 * GitRepositoryLink can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}`
 * * `{{project}}/{{location}}/{{parent_connection}}/{{git_repository_link_id}}`
 * * `{{location}}/{{parent_connection}}/{{git_repository_link_id}}`
 * When using the `pulumi import` command, GitRepositoryLink can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default {{project}}/{{location}}/{{parent_connection}}/{{git_repository_link_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default {{location}}/{{parent_connection}}/{{git_repository_link_id}}
 * ```
 * @property annotations Optional. Allows clients to store small amounts of arbitrary data.
 * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
 * Please refer to the field `effective_annotations` for all of the annotations present on the resource.
 * @property cloneUri Required. Git Clone URI.
 * @property etag Optional. This checksum is computed by the server based on the value of other
 * fields, and may be sent on update and delete requests to ensure the
 * client has an up-to-date value before proceeding.
 * @property gitRepositoryLinkId Required. The ID to use for the repository, which will become the final component of
 * the repository's resource name. This ID should be unique in the connection.
 * Allows alphanumeric characters and any of -._~%!$&'()*+,;=@.
 * - - -
 * @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 Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `developerconnect.googleapis.com/GitRepositoryLink`.
 * @property parentConnection Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `developerconnect.googleapis.com/GitRepositoryLink`.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 */
public data class GitRepositoryLinkArgs(
    public val annotations: Output>? = null,
    public val cloneUri: Output? = null,
    public val etag: Output? = null,
    public val gitRepositoryLinkId: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val parentConnection: Output? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.developerconnect.GitRepositoryLinkArgs =
        com.pulumi.gcp.developerconnect.GitRepositoryLinkArgs.builder()
            .annotations(
                annotations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .cloneUri(cloneUri?.applyValue({ args0 -> args0 }))
            .etag(etag?.applyValue({ args0 -> args0 }))
            .gitRepositoryLinkId(gitRepositoryLinkId?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .parentConnection(parentConnection?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 })).build()
}

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

    private var cloneUri: Output? = null

    private var etag: Output? = null

    private var gitRepositoryLinkId: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var parentConnection: Output? = null

    private var project: Output? = null

    /**
     * @param value Optional. Allows clients to store small amounts of arbitrary data.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("fvpxfhatuicpunsb")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

    /**
     * @param value Required. Git Clone URI.
     */
    @JvmName("dnpxkrvbobkirvub")
    public suspend fun cloneUri(`value`: Output) {
        this.cloneUri = value
    }

    /**
     * @param value Optional. This checksum is computed by the server based on the value of other
     * fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     */
    @JvmName("xlwsoymmxpfxsvfq")
    public suspend fun etag(`value`: Output) {
        this.etag = value
    }

    /**
     * @param value Required. The ID to use for the repository, which will become the final component of
     * the repository's resource name. This ID should be unique in the connection.
     * Allows alphanumeric characters and any of -._~%!$&'()*+,;=@.
     * - - -
     */
    @JvmName("ajpyvbyookcpajih")
    public suspend fun gitRepositoryLinkId(`value`: Output) {
        this.gitRepositoryLinkId = 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("pnpvoftetmucrlcb")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `developerconnect.googleapis.com/GitRepositoryLink`.
     */
    @JvmName("ushyflsjlwfqecxd")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `developerconnect.googleapis.com/GitRepositoryLink`.
     */
    @JvmName("jotqnvbwxuioqdem")
    public suspend fun parentConnection(`value`: Output) {
        this.parentConnection = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("bcuokshcuhcijyyg")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Optional. Allows clients to store small amounts of arbitrary data.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("bvqgnhrtvruwadpx")
    public suspend fun annotations(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values Optional. Allows clients to store small amounts of arbitrary data.
     * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
     * Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("gvirkcwcjqlpejqt")
    public fun annotations(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value Required. Git Clone URI.
     */
    @JvmName("pgtkmboorwgkvwql")
    public suspend fun cloneUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloneUri = mapped
    }

    /**
     * @param value Optional. This checksum is computed by the server based on the value of other
     * fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     */
    @JvmName("ybkdrioynionxmej")
    public suspend fun etag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.etag = mapped
    }

    /**
     * @param value Required. The ID to use for the repository, which will become the final component of
     * the repository's resource name. This ID should be unique in the connection.
     * Allows alphanumeric characters and any of -._~%!$&'()*+,;=@.
     * - - -
     */
    @JvmName("raqbnfsmkhtsrjuh")
    public suspend fun gitRepositoryLinkId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gitRepositoryLinkId = 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("auijbmbwmyjjuovi")
    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("jaiibkqltndnwfbl")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `developerconnect.googleapis.com/GitRepositoryLink`.
     */
    @JvmName("kbqkafisulkacqvp")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `developerconnect.googleapis.com/GitRepositoryLink`.
     */
    @JvmName("nxeqsqraackuehqc")
    public suspend fun parentConnection(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentConnection = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("kfirjtlbdyttsadc")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    internal fun build(): GitRepositoryLinkArgs = GitRepositoryLinkArgs(
        annotations = annotations,
        cloneUri = cloneUri,
        etag = etag,
        gitRepositoryLinkId = gitRepositoryLinkId,
        labels = labels,
        location = location,
        parentConnection = parentConnection,
        project = project,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy