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

commonMain.aws.sdk.kotlin.services.chimesdkmessaging.model.LambdaConfiguration.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.chimesdkmessaging.model



/**
 * Stores metadata about a Lambda processor.
 */
public class LambdaConfiguration private constructor(builder: Builder) {
    /**
     * Controls how the Lambda function is invoked.
     */
    public val invocationType: aws.sdk.kotlin.services.chimesdkmessaging.model.InvocationType = requireNotNull(builder.invocationType) { "A non-null value must be provided for invocationType" }
    /**
     * The ARN of the Lambda message processing function.
     */
    public val resourceArn: kotlin.String = requireNotNull(builder.resourceArn) { "A non-null value must be provided for resourceArn" }

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

    override fun toString(): kotlin.String = buildString {
        append("LambdaConfiguration(")
        append("invocationType=$invocationType,")
        append("resourceArn=$resourceArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = invocationType.hashCode()
        result = 31 * result + (resourceArn.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 LambdaConfiguration

        if (invocationType != other.invocationType) return false
        if (resourceArn != other.resourceArn) return false

        return true
    }

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

    public class Builder {
        /**
         * Controls how the Lambda function is invoked.
         */
        public var invocationType: aws.sdk.kotlin.services.chimesdkmessaging.model.InvocationType? = null
        /**
         * The ARN of the Lambda message processing function.
         */
        public var resourceArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.LambdaConfiguration) : this() {
            this.invocationType = x.invocationType
            this.resourceArn = x.resourceArn
        }

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

        internal fun correctErrors(): Builder {
            if (invocationType == null) invocationType = InvocationType.SdkUnknown("no value provided")
            if (resourceArn == null) resourceArn = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy