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

com.pulumi.alicloud.eci.kotlin.outputs.ContainerGroupInitContainer.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: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.eci.kotlin.outputs

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

/**
 *
 * @property args The arguments passed to the commands.
 * @property commands The commands run by the init container.
 * @property cpu The amount of CPU resources allocated to the container. Default value: `0`.
 * @property environmentVars The structure of environmentVars. See `environment_vars` below.
 * @property gpu The number GPUs. Default value: `0`.
 * @property image The image of the container.
 * @property imagePullPolicy The restart policy of the image. Default value: `IfNotPresent`. Valid values: `Always`, `IfNotPresent`, `Never`.
 * @property memory The amount of memory resources allocated to the container. Default value: `0`.
 * @property name The name of the mounted volume.
 * @property ports The structure of port. See `ports` below.
 * @property ready Indicates whether the container passed the readiness probe.
 * @property restartCount The number of times that the container restarted.
 * @property securityContexts The security context of the container. See `security_context` below.
 * @property volumeMounts The structure of volumeMounts. See `volume_mounts` below.
 * @property workingDir The working directory of the container.
 */
public data class ContainerGroupInitContainer(
    public val args: List? = null,
    public val commands: List? = null,
    public val cpu: Double? = null,
    public val environmentVars: List? = null,
    public val gpu: Int? = null,
    public val image: String? = null,
    public val imagePullPolicy: String? = null,
    public val memory: Double? = null,
    public val name: String? = null,
    public val ports: List? = null,
    public val ready: Boolean? = null,
    public val restartCount: Int? = null,
    public val securityContexts: List? = null,
    public val volumeMounts: List? = null,
    public val workingDir: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.alicloud.eci.outputs.ContainerGroupInitContainer): ContainerGroupInitContainer = ContainerGroupInitContainer(
            args = javaType.args().map({ args0 -> args0 }),
            commands = javaType.commands().map({ args0 -> args0 }),
            cpu = javaType.cpu().map({ args0 -> args0 }).orElse(null),
            environmentVars = javaType.environmentVars().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.alicloud.eci.kotlin.outputs.ContainerGroupInitContainerEnvironmentVar.Companion.toKotlin(args0)
                })
            }),
            gpu = javaType.gpu().map({ args0 -> args0 }).orElse(null),
            image = javaType.image().map({ args0 -> args0 }).orElse(null),
            imagePullPolicy = javaType.imagePullPolicy().map({ args0 -> args0 }).orElse(null),
            memory = javaType.memory().map({ args0 -> args0 }).orElse(null),
            name = javaType.name().map({ args0 -> args0 }).orElse(null),
            ports = javaType.ports().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.alicloud.eci.kotlin.outputs.ContainerGroupInitContainerPort.Companion.toKotlin(args0)
                })
            }),
            ready = javaType.ready().map({ args0 -> args0 }).orElse(null),
            restartCount = javaType.restartCount().map({ args0 -> args0 }).orElse(null),
            securityContexts = javaType.securityContexts().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.alicloud.eci.kotlin.outputs.ContainerGroupInitContainerSecurityContext.Companion.toKotlin(args0)
                })
            }),
            volumeMounts = javaType.volumeMounts().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.alicloud.eci.kotlin.outputs.ContainerGroupInitContainerVolumeMount.Companion.toKotlin(args0)
                })
            }),
            workingDir = javaType.workingDir().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy