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

commonMain.aws.sdk.kotlin.services.appsync.model.EvaluateMappingTemplateResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appsync.model

import aws.smithy.kotlin.runtime.SdkDsl

public class EvaluateMappingTemplateResponse private constructor(builder: Builder) {
    /**
     * The `ErrorDetail` object.
     */
    public val error: aws.sdk.kotlin.services.appsync.model.ErrorDetail? = builder.error
    /**
     * The mapping template; this can be a request or response template.
     */
    public val evaluationResult: kotlin.String? = builder.evaluationResult
    /**
     * A list of logs that were generated by calls to `util.log.info` and `util.log.error` in the evaluated code.
     */
    public val logs: List? = builder.logs

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

    override fun toString(): kotlin.String = buildString {
        append("EvaluateMappingTemplateResponse(")
        append("error=$error,")
        append("evaluationResult=$evaluationResult,")
        append("logs=$logs")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = error?.hashCode() ?: 0
        result = 31 * result + (evaluationResult?.hashCode() ?: 0)
        result = 31 * result + (logs?.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 EvaluateMappingTemplateResponse

        if (error != other.error) return false
        if (evaluationResult != other.evaluationResult) return false
        if (logs != other.logs) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The `ErrorDetail` object.
         */
        public var error: aws.sdk.kotlin.services.appsync.model.ErrorDetail? = null
        /**
         * The mapping template; this can be a request or response template.
         */
        public var evaluationResult: kotlin.String? = null
        /**
         * A list of logs that were generated by calls to `util.log.info` and `util.log.error` in the evaluated code.
         */
        public var logs: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appsync.model.EvaluateMappingTemplateResponse) : this() {
            this.error = x.error
            this.evaluationResult = x.evaluationResult
            this.logs = x.logs
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.appsync.model.ErrorDetail] inside the given [block]
         */
        public fun error(block: aws.sdk.kotlin.services.appsync.model.ErrorDetail.Builder.() -> kotlin.Unit) {
            this.error = aws.sdk.kotlin.services.appsync.model.ErrorDetail.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy