commonMain.aws.sdk.kotlin.services.glue.model.RunStatementRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
public class RunStatementRequest private constructor(builder: Builder) {
/**
* The statement code to be run.
*/
public val code: kotlin.String? = builder.code
/**
* The origin of the request.
*/
public val requestOrigin: kotlin.String? = builder.requestOrigin
/**
* The Session Id of the statement to be run.
*/
public val sessionId: kotlin.String? = builder.sessionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.RunStatementRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RunStatementRequest(")
append("code=$code,")
append("requestOrigin=$requestOrigin,")
append("sessionId=$sessionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
result = 31 * result + (requestOrigin?.hashCode() ?: 0)
result = 31 * result + (sessionId?.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 RunStatementRequest
if (code != other.code) return false
if (requestOrigin != other.requestOrigin) return false
if (sessionId != other.sessionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.RunStatementRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The statement code to be run.
*/
public var code: kotlin.String? = null
/**
* The origin of the request.
*/
public var requestOrigin: kotlin.String? = null
/**
* The Session Id of the statement to be run.
*/
public var sessionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.RunStatementRequest) : this() {
this.code = x.code
this.requestOrigin = x.requestOrigin
this.sessionId = x.sessionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.RunStatementRequest = RunStatementRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}