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

com.pulumi.azurenative.web.kotlin.WebAppSourceControlArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.web.kotlin

import com.pulumi.azurenative.web.WebAppSourceControlArgs.builder
import com.pulumi.azurenative.web.kotlin.inputs.GitHubActionConfigurationArgs
import com.pulumi.azurenative.web.kotlin.inputs.GitHubActionConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Source control configuration for an app.
 * Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * Other available API versions: 2020-10-01, 2023-01-01, 2023-12-01.
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:web:WebAppSourceControl myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web
 * ```
 * @property branch Name of branch to use for deployment.
 * @property deploymentRollbackEnabled true to enable deployment rollback; otherwise, false.
 * @property gitHubActionConfiguration If GitHub Action is selected, than the associated configuration.
 * @property isGitHubAction true if this is deployed via GitHub action.
 * @property isManualIntegration true to limit to manual integration; false to enable continuous integration (which configures webhooks into online repos like GitHub).
 * @property isMercurial true for a Mercurial repository; false for a Git repository.
 * @property kind Kind of resource.
 * @property name Name of the app.
 * @property repoUrl Repository or source control URL.
 * @property resourceGroupName Name of the resource group to which the resource belongs.
 */
public data class WebAppSourceControlArgs(
    public val branch: Output? = null,
    public val deploymentRollbackEnabled: Output? = null,
    public val gitHubActionConfiguration: Output? = null,
    public val isGitHubAction: Output? = null,
    public val isManualIntegration: Output? = null,
    public val isMercurial: Output? = null,
    public val kind: Output? = null,
    public val name: Output? = null,
    public val repoUrl: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.WebAppSourceControlArgs =
        com.pulumi.azurenative.web.WebAppSourceControlArgs.builder()
            .branch(branch?.applyValue({ args0 -> args0 }))
            .deploymentRollbackEnabled(deploymentRollbackEnabled?.applyValue({ args0 -> args0 }))
            .gitHubActionConfiguration(
                gitHubActionConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .isGitHubAction(isGitHubAction?.applyValue({ args0 -> args0 }))
            .isManualIntegration(isManualIntegration?.applyValue({ args0 -> args0 }))
            .isMercurial(isMercurial?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .repoUrl(repoUrl?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WebAppSourceControlArgs].
 */
@PulumiTagMarker
public class WebAppSourceControlArgsBuilder internal constructor() {
    private var branch: Output? = null

    private var deploymentRollbackEnabled: Output? = null

    private var gitHubActionConfiguration: Output? = null

    private var isGitHubAction: Output? = null

    private var isManualIntegration: Output? = null

    private var isMercurial: Output? = null

    private var kind: Output? = null

    private var name: Output? = null

    private var repoUrl: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value Name of branch to use for deployment.
     */
    @JvmName("pwccxdholhkjykcv")
    public suspend fun branch(`value`: Output) {
        this.branch = value
    }

    /**
     * @param value true to enable deployment rollback; otherwise, false.
     */
    @JvmName("suesacsiookuihqa")
    public suspend fun deploymentRollbackEnabled(`value`: Output) {
        this.deploymentRollbackEnabled = value
    }

    /**
     * @param value If GitHub Action is selected, than the associated configuration.
     */
    @JvmName("rtijwbgnsatwitkg")
    public suspend fun gitHubActionConfiguration(`value`: Output) {
        this.gitHubActionConfiguration = value
    }

    /**
     * @param value true if this is deployed via GitHub action.
     */
    @JvmName("rksjmxrbracxiedj")
    public suspend fun isGitHubAction(`value`: Output) {
        this.isGitHubAction = value
    }

    /**
     * @param value true to limit to manual integration; false to enable continuous integration (which configures webhooks into online repos like GitHub).
     */
    @JvmName("dyvljrqhjkogggrk")
    public suspend fun isManualIntegration(`value`: Output) {
        this.isManualIntegration = value
    }

    /**
     * @param value true for a Mercurial repository; false for a Git repository.
     */
    @JvmName("hwkwvukgyxqxalaq")
    public suspend fun isMercurial(`value`: Output) {
        this.isMercurial = value
    }

    /**
     * @param value Kind of resource.
     */
    @JvmName("hsgaqdckkeywfclt")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Name of the app.
     */
    @JvmName("ytpgwvtxymyflesn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Repository or source control URL.
     */
    @JvmName("nxbcareuhcjvqidy")
    public suspend fun repoUrl(`value`: Output) {
        this.repoUrl = value
    }

    /**
     * @param value Name of the resource group to which the resource belongs.
     */
    @JvmName("xmsgpobowwegmuus")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Name of branch to use for deployment.
     */
    @JvmName("rapumavokjcklvax")
    public suspend fun branch(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.branch = mapped
    }

    /**
     * @param value true to enable deployment rollback; otherwise, false.
     */
    @JvmName("wocvgoavigtwywai")
    public suspend fun deploymentRollbackEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentRollbackEnabled = mapped
    }

    /**
     * @param value If GitHub Action is selected, than the associated configuration.
     */
    @JvmName("doeonpkllhoauqbm")
    public suspend fun gitHubActionConfiguration(`value`: GitHubActionConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gitHubActionConfiguration = mapped
    }

    /**
     * @param argument If GitHub Action is selected, than the associated configuration.
     */
    @JvmName("wvpxdayguuvkfuwo")
    public suspend fun gitHubActionConfiguration(argument: suspend GitHubActionConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = GitHubActionConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.gitHubActionConfiguration = mapped
    }

    /**
     * @param value true if this is deployed via GitHub action.
     */
    @JvmName("xqkgvoqqmcjoujye")
    public suspend fun isGitHubAction(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isGitHubAction = mapped
    }

    /**
     * @param value true to limit to manual integration; false to enable continuous integration (which configures webhooks into online repos like GitHub).
     */
    @JvmName("paomnryrdxyigsff")
    public suspend fun isManualIntegration(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isManualIntegration = mapped
    }

    /**
     * @param value true for a Mercurial repository; false for a Git repository.
     */
    @JvmName("cfphjmjyllobvdch")
    public suspend fun isMercurial(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isMercurial = mapped
    }

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

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

    /**
     * @param value Repository or source control URL.
     */
    @JvmName("htcvvgsadmbvfomt")
    public suspend fun repoUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.repoUrl = mapped
    }

    /**
     * @param value Name of the resource group to which the resource belongs.
     */
    @JvmName("numqxfdnfidtfmss")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): WebAppSourceControlArgs = WebAppSourceControlArgs(
        branch = branch,
        deploymentRollbackEnabled = deploymentRollbackEnabled,
        gitHubActionConfiguration = gitHubActionConfiguration,
        isGitHubAction = isGitHubAction,
        isManualIntegration = isManualIntegration,
        isMercurial = isMercurial,
        kind = kind,
        name = name,
        repoUrl = repoUrl,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy