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

com.pulumi.digitalocean.kotlin.outputs.AppSpecService.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.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property alerts Describes an alert policy for the component.
 * @property autoscaling Configuration for automatically scaling this component based on metrics.
 * @property buildCommand An optional build command to run while building this component from source.
 * @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 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 healthCheck A health check to determine the availability of this component.
 * @property httpPort The internal port on which this service's run command will listen.
 * @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. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/api-reference/#operation/list_instance_sizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs`
 * @property internalPorts A list of ports on which this service will listen for internal traffic.
 * @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 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 AppSpecService(
    public val alerts: List? = null,
    public val autoscaling: AppSpecServiceAutoscaling? = null,
    public val buildCommand: String? = null,
    @Deprecated(
        message = """
  Service level CORS rules are deprecated in favor of ingresses
  """,
    )
    public val cors: AppSpecServiceCors? = null,
    public val dockerfilePath: String? = null,
    public val environmentSlug: String? = null,
    public val envs: List? = null,
    public val git: AppSpecServiceGit? = null,
    public val github: AppSpecServiceGithub? = null,
    public val gitlab: AppSpecServiceGitlab? = null,
    public val healthCheck: AppSpecServiceHealthCheck? = null,
    public val httpPort: Int? = null,
    public val image: AppSpecServiceImage? = null,
    public val instanceCount: Int? = null,
    public val instanceSizeSlug: String? = null,
    public val internalPorts: List? = 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 runCommand: String? = null,
    public val sourceDir: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.AppSpecService): AppSpecService =
            AppSpecService(
                alerts = javaType.alerts().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceAlert.Companion.toKotlin(args0)
                    })
                }),
                autoscaling = javaType.autoscaling().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceAutoscaling.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                buildCommand = javaType.buildCommand().map({ args0 -> args0 }).orElse(null),
                cors = javaType.cors().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceCors.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.AppSpecServiceEnv.Companion.toKotlin(args0)
                    })
                }),
                git = javaType.git().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceGit.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                github = javaType.github().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceGithub.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                gitlab = javaType.gitlab().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceGitlab.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                healthCheck = javaType.healthCheck().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceHealthCheck.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                httpPort = javaType.httpPort().map({ args0 -> args0 }).orElse(null),
                image = javaType.image().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceImage.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                instanceCount = javaType.instanceCount().map({ args0 -> args0 }).orElse(null),
                instanceSizeSlug = javaType.instanceSizeSlug().map({ args0 -> args0 }).orElse(null),
                internalPorts = javaType.internalPorts().map({ args0 -> args0 }),
                logDestinations = javaType.logDestinations().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceLogDestination.Companion.toKotlin(args0)
                    })
                }),
                name = javaType.name(),
                routes = javaType.routes().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.digitalocean.kotlin.outputs.AppSpecServiceRoute.Companion.toKotlin(args0)
                    })
                }),
                runCommand = javaType.runCommand().map({ args0 -> args0 }).orElse(null),
                sourceDir = javaType.sourceDir().map({ args0 -> args0 }).orElse(null),
            )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy