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

aws.sdk.kotlin.services.connect.model.AssociateLambdaFunctionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.connect.model



class AssociateLambdaFunctionRequest private constructor(builder: BuilderImpl) {
    /**
     * The Amazon Resource Name (ARN) for the Lambda function being associated. Maximum number of characters allowed is
     * 140.
     */
    val functionArn: String? = builder.functionArn
    /**
     * The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
     */
    val instanceId: String? = builder.instanceId

    companion object {
        @JvmStatic
        fun fluentBuilder(): FluentBuilder = BuilderImpl()

        internal fun builder(): DslBuilder = BuilderImpl()

        operator fun invoke(block: DslBuilder.() -> kotlin.Unit): AssociateLambdaFunctionRequest = BuilderImpl().apply(block).build()

    }

    override fun toString(): kotlin.String = buildString {
        append("AssociateLambdaFunctionRequest(")
        append("functionArn=$functionArn,")
        append("instanceId=$instanceId)")
    }

    override fun hashCode(): kotlin.Int {
        var result = functionArn?.hashCode() ?: 0
        result = 31 * result + (instanceId?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as AssociateLambdaFunctionRequest

        if (functionArn != other.functionArn) return false
        if (instanceId != other.instanceId) return false

        return true
    }

    fun copy(block: DslBuilder.() -> kotlin.Unit = {}): AssociateLambdaFunctionRequest = BuilderImpl(this).apply(block).build()

    interface FluentBuilder {
        fun build(): AssociateLambdaFunctionRequest
        /**
         * The Amazon Resource Name (ARN) for the Lambda function being associated. Maximum number of characters allowed is
         * 140.
         */
        fun functionArn(functionArn: String): FluentBuilder
        /**
         * The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
         */
        fun instanceId(instanceId: String): FluentBuilder
    }

    interface DslBuilder {
        /**
         * The Amazon Resource Name (ARN) for the Lambda function being associated. Maximum number of characters allowed is
         * 140.
         */
        var functionArn: String?
        /**
         * The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
         */
        var instanceId: String?

        fun build(): AssociateLambdaFunctionRequest
    }

    private class BuilderImpl() : FluentBuilder, DslBuilder {
        override var functionArn: String? = null
        override var instanceId: String? = null

        constructor(x: AssociateLambdaFunctionRequest) : this() {
            this.functionArn = x.functionArn
            this.instanceId = x.instanceId
        }

        override fun build(): AssociateLambdaFunctionRequest = AssociateLambdaFunctionRequest(this)
        override fun functionArn(functionArn: String): FluentBuilder = apply { this.functionArn = functionArn }
        override fun instanceId(instanceId: String): FluentBuilder = apply { this.instanceId = instanceId }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy