commonMain.aws.sdk.kotlin.services.glue.model.TableStatus.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* A structure containing information about the state of an asynchronous change to a table.
*/
public class TableStatus private constructor(builder: Builder) {
/**
* Indicates which action was called on the table, currently only `CREATE` or `UPDATE`.
*/
public val action: aws.sdk.kotlin.services.glue.model.ResourceAction? = builder.action
/**
* A `StatusDetails` object with information about the requested change.
*/
public val details: aws.sdk.kotlin.services.glue.model.StatusDetails? = builder.details
/**
* An error that will only appear when the state is "FAILED". This is a parent level exception message, there may be different `Error`s for each dialect.
*/
public val error: aws.sdk.kotlin.services.glue.model.ErrorDetail? = builder.error
/**
* An ISO 8601 formatted date string indicating the time that the change was initiated.
*/
public val requestTime: aws.smithy.kotlin.runtime.time.Instant? = builder.requestTime
/**
* The ARN of the user who requested the asynchronous change.
*/
public val requestedBy: kotlin.String? = builder.requestedBy
/**
* A generic status for the change in progress, such as QUEUED, IN_PROGRESS, SUCCESS, or FAILED.
*/
public val state: aws.sdk.kotlin.services.glue.model.ResourceState? = builder.state
/**
* An ISO 8601 formatted date string indicating the time that the state was last updated.
*/
public val updateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.updateTime
/**
* The ARN of the user to last manually alter the asynchronous change (requesting cancellation, etc).
*/
public val updatedBy: kotlin.String? = builder.updatedBy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.TableStatus = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TableStatus(")
append("action=$action,")
append("details=$details,")
append("error=$error,")
append("requestTime=$requestTime,")
append("requestedBy=$requestedBy,")
append("state=$state,")
append("updateTime=$updateTime,")
append("updatedBy=$updatedBy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (details?.hashCode() ?: 0)
result = 31 * result + (error?.hashCode() ?: 0)
result = 31 * result + (requestTime?.hashCode() ?: 0)
result = 31 * result + (requestedBy?.hashCode() ?: 0)
result = 31 * result + (state?.hashCode() ?: 0)
result = 31 * result + (updateTime?.hashCode() ?: 0)
result = 31 * result + (updatedBy?.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 TableStatus
if (action != other.action) return false
if (details != other.details) return false
if (error != other.error) return false
if (requestTime != other.requestTime) return false
if (requestedBy != other.requestedBy) return false
if (state != other.state) return false
if (updateTime != other.updateTime) return false
if (updatedBy != other.updatedBy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.TableStatus = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates which action was called on the table, currently only `CREATE` or `UPDATE`.
*/
public var action: aws.sdk.kotlin.services.glue.model.ResourceAction? = null
/**
* A `StatusDetails` object with information about the requested change.
*/
public var details: aws.sdk.kotlin.services.glue.model.StatusDetails? = null
/**
* An error that will only appear when the state is "FAILED". This is a parent level exception message, there may be different `Error`s for each dialect.
*/
public var error: aws.sdk.kotlin.services.glue.model.ErrorDetail? = null
/**
* An ISO 8601 formatted date string indicating the time that the change was initiated.
*/
public var requestTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The ARN of the user who requested the asynchronous change.
*/
public var requestedBy: kotlin.String? = null
/**
* A generic status for the change in progress, such as QUEUED, IN_PROGRESS, SUCCESS, or FAILED.
*/
public var state: aws.sdk.kotlin.services.glue.model.ResourceState? = null
/**
* An ISO 8601 formatted date string indicating the time that the state was last updated.
*/
public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The ARN of the user to last manually alter the asynchronous change (requesting cancellation, etc).
*/
public var updatedBy: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.TableStatus) : this() {
this.action = x.action
this.details = x.details
this.error = x.error
this.requestTime = x.requestTime
this.requestedBy = x.requestedBy
this.state = x.state
this.updateTime = x.updateTime
this.updatedBy = x.updatedBy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.TableStatus = TableStatus(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.StatusDetails] inside the given [block]
*/
public fun details(block: aws.sdk.kotlin.services.glue.model.StatusDetails.Builder.() -> kotlin.Unit) {
this.details = aws.sdk.kotlin.services.glue.model.StatusDetails.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.ErrorDetail] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.glue.model.ErrorDetail.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.glue.model.ErrorDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}