commonMain.aws.sdk.kotlin.services.glue.model.Statement.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
/**
* The statement or request for a particular action to occur in a session.
*/
public class Statement private constructor(builder: Builder) {
/**
* The execution code of the statement.
*/
public val code: kotlin.String? = builder.code
/**
* The unix time and date that the job definition was completed.
*/
public val completedOn: kotlin.Long = builder.completedOn
/**
* The ID of the statement.
*/
public val id: kotlin.Int = builder.id
/**
* The output in JSON.
*/
public val output: aws.sdk.kotlin.services.glue.model.StatementOutput? = builder.output
/**
* The code execution progress.
*/
public val progress: kotlin.Double = builder.progress
/**
* The unix time and date that the job definition was started.
*/
public val startedOn: kotlin.Long = builder.startedOn
/**
* The state while request is actioned.
*/
public val state: aws.sdk.kotlin.services.glue.model.StatementState? = builder.state
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Statement = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Statement(")
append("code=$code,")
append("completedOn=$completedOn,")
append("id=$id,")
append("output=$output,")
append("progress=$progress,")
append("startedOn=$startedOn,")
append("state=$state")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
result = 31 * result + (completedOn.hashCode())
result = 31 * result + (id)
result = 31 * result + (output?.hashCode() ?: 0)
result = 31 * result + (progress.hashCode())
result = 31 * result + (startedOn.hashCode())
result = 31 * result + (state?.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 Statement
if (code != other.code) return false
if (completedOn != other.completedOn) return false
if (id != other.id) return false
if (output != other.output) return false
if (!(progress?.equals(other.progress) ?: (other.progress == null))) return false
if (startedOn != other.startedOn) return false
if (state != other.state) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Statement = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The execution code of the statement.
*/
public var code: kotlin.String? = null
/**
* The unix time and date that the job definition was completed.
*/
public var completedOn: kotlin.Long = 0L
/**
* The ID of the statement.
*/
public var id: kotlin.Int = 0
/**
* The output in JSON.
*/
public var output: aws.sdk.kotlin.services.glue.model.StatementOutput? = null
/**
* The code execution progress.
*/
public var progress: kotlin.Double = 0.0
/**
* The unix time and date that the job definition was started.
*/
public var startedOn: kotlin.Long = 0L
/**
* The state while request is actioned.
*/
public var state: aws.sdk.kotlin.services.glue.model.StatementState? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.Statement) : this() {
this.code = x.code
this.completedOn = x.completedOn
this.id = x.id
this.output = x.output
this.progress = x.progress
this.startedOn = x.startedOn
this.state = x.state
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.Statement = Statement(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.StatementOutput] inside the given [block]
*/
public fun output(block: aws.sdk.kotlin.services.glue.model.StatementOutput.Builder.() -> kotlin.Unit) {
this.output = aws.sdk.kotlin.services.glue.model.StatementOutput.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}