
commonMain.aws.sdk.kotlin.services.pipes.model.EcsEnvironmentFile.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pipes.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A list of files containing the environment variables to pass to a container. You can specify up to ten environment files. The file must have a `.env` file extension. Each line in an environment file should contain an environment variable in `VARIABLE=VALUE` format. Lines beginning with `#` are treated as comments and are ignored. For more information about the environment variable file syntax, see [Declare default environment variables in file](https://docs.docker.com/compose/env-file/).
*
* If there are environment variables specified using the `environment` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Specifying environment variables](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) in the *Amazon Elastic Container Service Developer Guide*.
*
* This parameter is only supported for tasks hosted on Fargate using the following platform versions:
* + Linux platform version `1.4.0` or later.
* + Windows platform version `1.0.0` or later.
*/
public class EcsEnvironmentFile private constructor(builder: Builder) {
/**
* The file type to use. The only supported value is `s3`.
*/
public val type: aws.sdk.kotlin.services.pipes.model.EcsEnvironmentFileType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
/**
* The Amazon Resource Name (ARN) of the Amazon S3 object containing the environment variable file.
*/
public val value: kotlin.String = requireNotNull(builder.value) { "A non-null value must be provided for value" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pipes.model.EcsEnvironmentFile = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EcsEnvironmentFile(")
append("type=$type,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = type.hashCode()
result = 31 * result + (value.hashCode())
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as EcsEnvironmentFile
if (type != other.type) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pipes.model.EcsEnvironmentFile = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The file type to use. The only supported value is `s3`.
*/
public var type: aws.sdk.kotlin.services.pipes.model.EcsEnvironmentFileType? = null
/**
* The Amazon Resource Name (ARN) of the Amazon S3 object containing the environment variable file.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pipes.model.EcsEnvironmentFile) : this() {
this.type = x.type
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pipes.model.EcsEnvironmentFile = EcsEnvironmentFile(this)
internal fun correctErrors(): Builder {
if (type == null) type = EcsEnvironmentFileType.SdkUnknown("no value provided")
if (value == null) value = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy