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

aws.sdk.kotlin.services.codebuild.model.EnvironmentVariable.kt Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codebuild.model



/**
 * Information about an environment variable for a build project or a build.
 */
class EnvironmentVariable private constructor(builder: Builder) {
    /**
     * The name or key of the environment variable.
     */
    val name: kotlin.String? = builder.name
    /**
     * The type of environment variable. Valid values include:
     * PARAMETER_STORE: An environment variable stored in Systems Manager
     * Parameter Store. To learn how to specify a parameter store environment variable,
     * see env/parameter-store in the
     * CodeBuild User Guide.
     * PLAINTEXT: An environment variable in plain text format. This is
     * the default value.
     * SECRETS_MANAGER: An environment variable stored in Secrets Manager. To learn how to specify a secrets manager environment variable, see
     * env/secrets-manager in the
     * CodeBuild User Guide.
     */
    val type: aws.sdk.kotlin.services.codebuild.model.EnvironmentVariableType? = builder.type
    /**
     * The value of the environment variable.
     * We strongly discourage the use of PLAINTEXT environment variables to
     * store sensitive values, especially Amazon Web Services secret key IDs and secret access keys.
     * PLAINTEXT environment variables can be displayed in plain text
     * using the CodeBuild console and the CLI. For sensitive values, we recommend you use an
     * environment variable of type PARAMETER_STORE or
     * SECRETS_MANAGER.
     */
    val value: kotlin.String? = builder.value

    companion object {
        operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codebuild.model.EnvironmentVariable = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("EnvironmentVariable(")
        append("name=$name,")
        append("type=$type,")
        append("value=$value)")
    }

    override fun hashCode(): kotlin.Int {
        var result = name?.hashCode() ?: 0
        result = 31 * result + (type?.hashCode() ?: 0)
        result = 31 * result + (value?.hashCode() ?: 0)
        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 EnvironmentVariable

        if (name != other.name) return false
        if (type != other.type) return false
        if (value != other.value) return false

        return true
    }

    inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codebuild.model.EnvironmentVariable = Builder(this).apply(block).build()

    class Builder {
        /**
         * The name or key of the environment variable.
         */
        var name: kotlin.String? = null
        /**
         * The type of environment variable. Valid values include:
         * PARAMETER_STORE: An environment variable stored in Systems Manager
         * Parameter Store. To learn how to specify a parameter store environment variable,
         * see env/parameter-store in the
         * CodeBuild User Guide.
         * PLAINTEXT: An environment variable in plain text format. This is
         * the default value.
         * SECRETS_MANAGER: An environment variable stored in Secrets Manager. To learn how to specify a secrets manager environment variable, see
         * env/secrets-manager in the
         * CodeBuild User Guide.
         */
        var type: aws.sdk.kotlin.services.codebuild.model.EnvironmentVariableType? = null
        /**
         * The value of the environment variable.
         * We strongly discourage the use of PLAINTEXT environment variables to
         * store sensitive values, especially Amazon Web Services secret key IDs and secret access keys.
         * PLAINTEXT environment variables can be displayed in plain text
         * using the CodeBuild console and the CLI. For sensitive values, we recommend you use an
         * environment variable of type PARAMETER_STORE or
         * SECRETS_MANAGER.
         */
        var value: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codebuild.model.EnvironmentVariable) : this() {
            this.name = x.name
            this.type = x.type
            this.value = x.value
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codebuild.model.EnvironmentVariable = EnvironmentVariable(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy