commonMain.aws.sdk.kotlin.services.appsync.model.EvaluateCodeResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appsync-jvm Show documentation
Show all versions of appsync-jvm Show documentation
The AWS SDK for Kotlin client for AppSync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appsync.model
import aws.smithy.kotlin.runtime.SdkDsl
public class EvaluateCodeResponse private constructor(builder: Builder) {
/**
* Contains the payload of the response error.
*/
public val error: aws.sdk.kotlin.services.appsync.model.EvaluateCodeErrorDetail? = builder.error
/**
* The result of the evaluation operation.
*/
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.EvaluateCodeResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EvaluateCodeResponse(")
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 EvaluateCodeResponse
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.EvaluateCodeResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains the payload of the response error.
*/
public var error: aws.sdk.kotlin.services.appsync.model.EvaluateCodeErrorDetail? = null
/**
* The result of the evaluation operation.
*/
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.EvaluateCodeResponse) : this() {
this.error = x.error
this.evaluationResult = x.evaluationResult
this.logs = x.logs
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appsync.model.EvaluateCodeResponse = EvaluateCodeResponse(this)
/**
* construct an [aws.sdk.kotlin.services.appsync.model.EvaluateCodeErrorDetail] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.appsync.model.EvaluateCodeErrorDetail.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.appsync.model.EvaluateCodeErrorDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}