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

com.pulumi.awsnative.amplify.kotlin.outputs.GetBranchResult.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.amplify.kotlin.outputs

import com.pulumi.awsnative.amplify.kotlin.enums.BranchStage
import com.pulumi.awsnative.kotlin.outputs.Tag
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property arn ARN for a branch, part of an Amplify App.
 * @property backend The backend for a `Branch` of an Amplify app. Use for a backend created from an AWS CloudFormation stack.
 * This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
 * @property buildSpec The build specification (build spec) for the branch.
 * @property description The description for the branch that is part of an Amplify app.
 * @property enableAutoBuild Enables auto building for the branch.
 * @property enablePerformanceMode Enables performance mode for the branch.
 * Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
 * @property enablePullRequestPreview Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
 * To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the `PullRequestEnvironmentName` property.
 * For more information, see [Web Previews](https://docs.aws.amazon.com/amplify/latest/userguide/pr-previews.html) in the *AWS Amplify Hosting User Guide* .
 * @property environmentVariables The environment variables for the branch.
 * @property framework The framework for the branch.
 * @property pullRequestEnvironmentName If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. For example, you could specify an environment named `prod` , `test` , or `dev` that you initialized with the Amplify CLI and mapped to this branch.
 * To enable pull request previews, set the `EnablePullRequestPreview` property to `true` .
 * If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.
 * For more information about creating backend environments, see [Feature Branch Deployments and Team Workflows](https://docs.aws.amazon.com/amplify/latest/userguide/multi-environments.html) in the *AWS Amplify Hosting User Guide* .
 * @property stage Describes the current stage for the branch.
 * @property tags The tag for the branch.
 */
public data class GetBranchResult(
    public val arn: String? = null,
    public val backend: BranchBackend? = null,
    public val buildSpec: String? = null,
    public val description: String? = null,
    public val enableAutoBuild: Boolean? = null,
    public val enablePerformanceMode: Boolean? = null,
    public val enablePullRequestPreview: Boolean? = null,
    public val environmentVariables: List? = null,
    public val framework: String? = null,
    public val pullRequestEnvironmentName: String? = null,
    public val stage: BranchStage? = null,
    public val tags: List? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.amplify.outputs.GetBranchResult): GetBranchResult = GetBranchResult(
            arn = javaType.arn().map({ args0 -> args0 }).orElse(null),
            backend = javaType.backend().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.amplify.kotlin.outputs.BranchBackend.Companion.toKotlin(args0)
                })
            }).orElse(null),
            buildSpec = javaType.buildSpec().map({ args0 -> args0 }).orElse(null),
            description = javaType.description().map({ args0 -> args0 }).orElse(null),
            enableAutoBuild = javaType.enableAutoBuild().map({ args0 -> args0 }).orElse(null),
            enablePerformanceMode = javaType.enablePerformanceMode().map({ args0 -> args0 }).orElse(null),
            enablePullRequestPreview = javaType.enablePullRequestPreview().map({ args0 -> args0 }).orElse(null),
            environmentVariables = javaType.environmentVariables().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.amplify.kotlin.outputs.BranchEnvironmentVariable.Companion.toKotlin(args0)
                })
            }),
            framework = javaType.framework().map({ args0 -> args0 }).orElse(null),
            pullRequestEnvironmentName = javaType.pullRequestEnvironmentName().map({ args0 ->
                args0
            }).orElse(null),
            stage = javaType.stage().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.amplify.kotlin.enums.BranchStage.Companion.toKotlin(args0)
                })
            }).orElse(null),
            tags = javaType.tags().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin(args0)
                })
            }),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy