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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 4.38.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property alerts Describes an alert policy for the component.
 * @property buildCommand An optional build command to run while building this component from source.
 * @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 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 image An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
 * @property instanceCount The amount of instances that this component should be scaled to.
 * @property instanceSizeSlug The instance size to use for this component.
 * @property kind The type of job and when it will be run during the deployment process. It may be one of:
 * - `UNSPECIFIED`: Default job type, will auto-complete to POST_DEPLOY kind.
 * - `PRE_DEPLOY`: Indicates a job that runs before an app deployment.
 * - `POST_DEPLOY`: Indicates a job that runs after an app deployment.
 * - `FAILED_DEPLOY`: Indicates a job that runs after a component fails to deploy.
 * @property logDestinations Describes a log forwarding destination.
 * @property name The name of the component.
 * @property runCommand An optional run command to override the component's default.
 * @property sourceDir An optional path to the working directory to use for the build.
 */
public data class GetAppSpecJob(
    public val alerts: List? = null,
    public val buildCommand: String? = null,
    public val dockerfilePath: String? = null,
    public val environmentSlug: String? = null,
    public val envs: List? = null,
    public val git: GetAppSpecJobGit? = null,
    public val github: GetAppSpecJobGithub? = null,
    public val gitlab: GetAppSpecJobGitlab? = null,
    public val image: GetAppSpecJobImage? = null,
    public val instanceCount: Int? = null,
    public val instanceSizeSlug: String? = null,
    public val kind: String? = null,
    public val logDestinations: List? = null,
    public val name: String,
    public val runCommand: String? = null,
    public val sourceDir: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.GetAppSpecJob): GetAppSpecJob =
            GetAppSpecJob(
                alerts = javaType.alerts().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.GetAppSpecJobAlert.Companion.toKotlin(args0)
                    })
                }),
                buildCommand = javaType.buildCommand().map({ args0 -> 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.GetAppSpecJobEnv.Companion.toKotlin(args0)
                    })
                }),
                git = javaType.git().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.GetAppSpecJobGit.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                github = javaType.github().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.GetAppSpecJobGithub.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                gitlab = javaType.gitlab().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.GetAppSpecJobGitlab.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                image = javaType.image().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.GetAppSpecJobImage.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                instanceCount = javaType.instanceCount().map({ args0 -> args0 }).orElse(null),
                instanceSizeSlug = javaType.instanceSizeSlug().map({ args0 -> args0 }).orElse(null),
                kind = javaType.kind().map({ args0 -> args0 }).orElse(null),
                logDestinations = javaType.logDestinations().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.GetAppSpecJobLogDestination.Companion.toKotlin(args0)
                    })
                }),
                name = javaType.name(),
                runCommand = javaType.runCommand().map({ args0 -> args0 }).orElse(null),
                sourceDir = javaType.sourceDir().map({ args0 -> args0 }).orElse(null),
            )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy