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

commonMain.aws.sdk.kotlin.services.codedeploy.model.LambdaFunctionInfo.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codedeploy.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about a Lambda function specified in a deployment.
 */
public class LambdaFunctionInfo private constructor(builder: Builder) {
    /**
     * The version of a Lambda function that production traffic points to.
     */
    public val currentVersion: kotlin.String? = builder.currentVersion
    /**
     * The alias of a Lambda function. For more information, see [Lambda Function Aliases](https://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html) in the *Lambda Developer Guide*.
     */
    public val functionAlias: kotlin.String? = builder.functionAlias
    /**
     * The name of a Lambda function.
     */
    public val functionName: kotlin.String? = builder.functionName
    /**
     * The version of a Lambda function that production traffic points to after the Lambda function is deployed.
     */
    public val targetVersion: kotlin.String? = builder.targetVersion
    /**
     * The percentage of production traffic that the target version of a Lambda function receives.
     */
    public val targetVersionWeight: kotlin.Double = builder.targetVersionWeight

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

    override fun toString(): kotlin.String = buildString {
        append("LambdaFunctionInfo(")
        append("currentVersion=$currentVersion,")
        append("functionAlias=$functionAlias,")
        append("functionName=$functionName,")
        append("targetVersion=$targetVersion,")
        append("targetVersionWeight=$targetVersionWeight")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = currentVersion?.hashCode() ?: 0
        result = 31 * result + (functionAlias?.hashCode() ?: 0)
        result = 31 * result + (functionName?.hashCode() ?: 0)
        result = 31 * result + (targetVersion?.hashCode() ?: 0)
        result = 31 * result + (targetVersionWeight.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 LambdaFunctionInfo

        if (currentVersion != other.currentVersion) return false
        if (functionAlias != other.functionAlias) return false
        if (functionName != other.functionName) return false
        if (targetVersion != other.targetVersion) return false
        if (!(targetVersionWeight?.equals(other.targetVersionWeight) ?: (other.targetVersionWeight == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The version of a Lambda function that production traffic points to.
         */
        public var currentVersion: kotlin.String? = null
        /**
         * The alias of a Lambda function. For more information, see [Lambda Function Aliases](https://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html) in the *Lambda Developer Guide*.
         */
        public var functionAlias: kotlin.String? = null
        /**
         * The name of a Lambda function.
         */
        public var functionName: kotlin.String? = null
        /**
         * The version of a Lambda function that production traffic points to after the Lambda function is deployed.
         */
        public var targetVersion: kotlin.String? = null
        /**
         * The percentage of production traffic that the target version of a Lambda function receives.
         */
        public var targetVersionWeight: kotlin.Double = 0.0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.LambdaFunctionInfo) : this() {
            this.currentVersion = x.currentVersion
            this.functionAlias = x.functionAlias
            this.functionName = x.functionName
            this.targetVersion = x.targetVersion
            this.targetVersionWeight = x.targetVersionWeight
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codedeploy.model.LambdaFunctionInfo = LambdaFunctionInfo(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy