commonMain.aws.sdk.kotlin.services.route53.model.ChangeInfo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53-jvm Show documentation
Show all versions of route53-jvm Show documentation
The AWS SDK for Kotlin client for Route 53
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A complex type that describes change information about changes made to your hosted zone.
*/
public class ChangeInfo private constructor(builder: Builder) {
/**
* A comment you can provide.
*/
public val comment: kotlin.String? = builder.comment
/**
* This element contains an ID that you use when performing a [GetChange](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html) action to get detailed information about the change.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* The current state of the request. `PENDING` indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.
*/
public val status: aws.sdk.kotlin.services.route53.model.ChangeStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* The date and time that the change request was submitted in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) and Coordinated Universal Time (UTC). For example, the value `2017-03-27T17:48:16.751Z` represents March 27, 2017 at 17:48:16.751 UTC.
*/
public val submittedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.submittedAt) { "A non-null value must be provided for submittedAt" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.ChangeInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ChangeInfo(")
append("comment=$comment,")
append("id=$id,")
append("status=$status,")
append("submittedAt=$submittedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = comment?.hashCode() ?: 0
result = 31 * result + (id.hashCode())
result = 31 * result + (status.hashCode())
result = 31 * result + (submittedAt.hashCode())
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 ChangeInfo
if (comment != other.comment) return false
if (id != other.id) return false
if (status != other.status) return false
if (submittedAt != other.submittedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.ChangeInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A comment you can provide.
*/
public var comment: kotlin.String? = null
/**
* This element contains an ID that you use when performing a [GetChange](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html) action to get detailed information about the change.
*/
public var id: kotlin.String? = null
/**
* The current state of the request. `PENDING` indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.
*/
public var status: aws.sdk.kotlin.services.route53.model.ChangeStatus? = null
/**
* The date and time that the change request was submitted in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) and Coordinated Universal Time (UTC). For example, the value `2017-03-27T17:48:16.751Z` represents March 27, 2017 at 17:48:16.751 UTC.
*/
public var submittedAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.ChangeInfo) : this() {
this.comment = x.comment
this.id = x.id
this.status = x.status
this.submittedAt = x.submittedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.ChangeInfo = ChangeInfo(this)
internal fun correctErrors(): Builder {
if (id == null) id = ""
if (status == null) status = ChangeStatus.SdkUnknown("no value provided")
if (submittedAt == null) submittedAt = Instant.fromEpochSeconds(0)
return this
}
}
}