commonMain.aws.sdk.kotlin.services.mwaa.model.LastUpdate.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mwaa-jvm Show documentation
Show all versions of mwaa-jvm Show documentation
The AWS SDK for Kotlin client for MWAA
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.mwaa.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Describes the status of the last update on the environment, and any errors that were encountered.
*/
public class LastUpdate private constructor(builder: Builder) {
/**
* The day and time of the last update on the environment.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
/**
* The error that was encountered during the last update of the environment.
*/
public val error: aws.sdk.kotlin.services.mwaa.model.UpdateError? = builder.error
/**
* The source of the last update to the environment. Includes internal processes by Amazon MWAA, such as an environment maintenance update.
*/
public val source: kotlin.String? = builder.source
/**
* The status of the last update on the environment.
*/
public val status: aws.sdk.kotlin.services.mwaa.model.UpdateStatus? = builder.status
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mwaa.model.LastUpdate = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LastUpdate(")
append("createdAt=$createdAt,")
append("error=$error,")
append("source=$source,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createdAt?.hashCode() ?: 0
result = 31 * result + (error?.hashCode() ?: 0)
result = 31 * result + (source?.hashCode() ?: 0)
result = 31 * result + (status?.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 LastUpdate
if (createdAt != other.createdAt) return false
if (error != other.error) return false
if (source != other.source) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.mwaa.model.LastUpdate = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The day and time of the last update on the environment.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The error that was encountered during the last update of the environment.
*/
public var error: aws.sdk.kotlin.services.mwaa.model.UpdateError? = null
/**
* The source of the last update to the environment. Includes internal processes by Amazon MWAA, such as an environment maintenance update.
*/
public var source: kotlin.String? = null
/**
* The status of the last update on the environment.
*/
public var status: aws.sdk.kotlin.services.mwaa.model.UpdateStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.mwaa.model.LastUpdate) : this() {
this.createdAt = x.createdAt
this.error = x.error
this.source = x.source
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.mwaa.model.LastUpdate = LastUpdate(this)
/**
* construct an [aws.sdk.kotlin.services.mwaa.model.UpdateError] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.mwaa.model.UpdateError.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.mwaa.model.UpdateError.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}