commonMain.aws.sdk.kotlin.services.servicediscovery.model.SoaChange.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of servicediscovery-jvm Show documentation
Show all versions of servicediscovery-jvm Show documentation
The AWS SDK for Kotlin client for ServiceDiscovery
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.servicediscovery.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Updated Start of Authority (SOA) properties for a public or private DNS namespace.
*/
public class SoaChange private constructor(builder: Builder) {
/**
* The updated time to live (TTL) for purposes of negative caching.
*/
public val ttl: kotlin.Long = requireNotNull(builder.ttl) { "A non-null value must be provided for ttl" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.servicediscovery.model.SoaChange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SoaChange(")
append("ttl=$ttl")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = ttl.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 SoaChange
if (ttl != other.ttl) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.servicediscovery.model.SoaChange = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The updated time to live (TTL) for purposes of negative caching.
*/
public var ttl: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.SoaChange) : this() {
this.ttl = x.ttl
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.servicediscovery.model.SoaChange = SoaChange(this)
internal fun correctErrors(): Builder {
if (ttl == null) ttl = 0L
return this
}
}
}