com.pulumi.digitalocean.kotlin.outputs.AppSpecFunction.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-digitalocean-kotlin Show documentation
Show all versions of pulumi-digitalocean-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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 alerts Describes an alert policy for the component.
* @property cors The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
* @property envs Describes an environment variable made available to an app competent.
* @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 logDestinations Describes a log forwarding destination.
* @property name The name of the component.
* @property routes An HTTP paths that should be routed to this component.
* @property sourceDir An optional path to the working directory to use for the build.
*/
public data class AppSpecFunction(
public val alerts: List? = null,
@Deprecated(
message = """
Service level CORS rules are deprecated in favor of ingresses
""",
)
public val cors: AppSpecFunctionCors? = null,
public val envs: List? = null,
public val git: AppSpecFunctionGit? = null,
public val github: AppSpecFunctionGithub? = null,
public val gitlab: AppSpecFunctionGitlab? = null,
public val logDestinations: List? = null,
public val name: String,
@Deprecated(
message = """
Service level routes are deprecated in favor of ingresses
""",
)
public val routes: List? = null,
public val sourceDir: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.AppSpecFunction): AppSpecFunction = AppSpecFunction(
alerts = javaType.alerts().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.AppSpecFunctionAlert.Companion.toKotlin(args0)
})
}),
cors = javaType.cors().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.AppSpecFunctionCors.Companion.toKotlin(args0)
})
}).orElse(null),
envs = javaType.envs().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.AppSpecFunctionEnv.Companion.toKotlin(args0)
})
}),
git = javaType.git().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.AppSpecFunctionGit.Companion.toKotlin(args0)
})
}).orElse(null),
github = javaType.github().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.AppSpecFunctionGithub.Companion.toKotlin(args0)
})
}).orElse(null),
gitlab = javaType.gitlab().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.AppSpecFunctionGitlab.Companion.toKotlin(args0)
})
}).orElse(null),
logDestinations = javaType.logDestinations().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.AppSpecFunctionLogDestination.Companion.toKotlin(args0)
})
}),
name = javaType.name(),
routes = javaType.routes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.digitalocean.kotlin.outputs.AppSpecFunctionRoute.Companion.toKotlin(args0)
})
}),
sourceDir = javaType.sourceDir().map({ args0 -> args0 }).orElse(null),
)
}
}