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

com.pulumi.digitalocean.kotlin.outputs.GetAppSpecStaticSite.kt Maven / Gradle / Ivy

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

package com.pulumi.digitalocean.kotlin.outputs

import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property buildCommand An optional build command to run while building this component from source.
 * @property catchallDocument The name of the document to use as the fallback for any requests to documents that are not found when serving this static site.
 * @property cors The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
 * @property dockerfilePath The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
 * @property environmentSlug An environment slug describing the type of this app.
 * @property envs Describes an environment variable made available to an app competent.
 * @property errorDocument The name of the error document to use when serving this static site.
 * @property git A Git repo to use as the component's source. The repository must be able to be cloned without authentication.  Only one of `git`, `github` or `gitlab`  may be set.
 * @property github A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
 * @property gitlab A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
 * @property indexDocument The name of the index document to use when serving this static site.
 * @property name The name of the component.
 * @property outputDir An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`.
 * @property routes
 * @property sourceDir An optional path to the working directory to use for the build.
 */
public data class GetAppSpecStaticSite(
    public val buildCommand: String? = null,
    public val catchallDocument: String? = null,
    @Deprecated(
        message = """
  Service level CORS rules are deprecated in favor of ingresses
  """,
    )
    public val cors: GetAppSpecStaticSiteCors? = null,
    public val dockerfilePath: String? = null,
    public val environmentSlug: String? = null,
    public val envs: List? = null,
    public val errorDocument: String? = null,
    public val git: GetAppSpecStaticSiteGit? = null,
    public val github: GetAppSpecStaticSiteGithub? = null,
    public val gitlab: GetAppSpecStaticSiteGitlab? = null,
    public val indexDocument: String? = null,
    public val name: String,
    public val outputDir: String? = null,
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    public val routes: List,
    public val sourceDir: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.GetAppSpecStaticSite): GetAppSpecStaticSite = GetAppSpecStaticSite(
            buildCommand = javaType.buildCommand().map({ args0 -> args0 }).orElse(null),
            catchallDocument = javaType.catchallDocument().map({ args0 -> args0 }).orElse(null),
            cors = javaType.cors().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.digitalocean.kotlin.outputs.GetAppSpecStaticSiteCors.Companion.toKotlin(args0)
                })
            }).orElse(null),
            dockerfilePath = javaType.dockerfilePath().map({ args0 -> args0 }).orElse(null),
            environmentSlug = javaType.environmentSlug().map({ args0 -> args0 }).orElse(null),
            envs = javaType.envs().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.digitalocean.kotlin.outputs.GetAppSpecStaticSiteEnv.Companion.toKotlin(args0)
                })
            }),
            errorDocument = javaType.errorDocument().map({ args0 -> args0 }).orElse(null),
            git = javaType.git().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.digitalocean.kotlin.outputs.GetAppSpecStaticSiteGit.Companion.toKotlin(args0)
                })
            }).orElse(null),
            github = javaType.github().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.digitalocean.kotlin.outputs.GetAppSpecStaticSiteGithub.Companion.toKotlin(args0)
                })
            }).orElse(null),
            gitlab = javaType.gitlab().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.digitalocean.kotlin.outputs.GetAppSpecStaticSiteGitlab.Companion.toKotlin(args0)
                })
            }).orElse(null),
            indexDocument = javaType.indexDocument().map({ args0 -> args0 }).orElse(null),
            name = javaType.name(),
            outputDir = javaType.outputDir().map({ args0 -> args0 }).orElse(null),
            routes = javaType.routes().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.digitalocean.kotlin.outputs.GetAppSpecStaticSiteRoute.Companion.toKotlin(args0)
                })
            }),
            sourceDir = javaType.sourceDir().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy