commonMain.aws.sdk.kotlin.services.route53domains.model.Consent.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53domains-jvm Show documentation
Show all versions of route53domains-jvm Show documentation
The AWS SDK for Kotlin client for Route 53 Domains
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53domains.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Customer's consent for the owner change request.
*/
public class Consent private constructor(builder: Builder) {
/**
* Currency for the `MaxPrice`.
*/
public val currency: kotlin.String = requireNotNull(builder.currency) { "A non-null value must be provided for currency" }
/**
* Maximum amount the customer agreed to accept.
*/
public val maxPrice: kotlin.Double = builder.maxPrice
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53domains.model.Consent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Consent(")
append("currency=$currency,")
append("maxPrice=$maxPrice")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = currency.hashCode()
result = 31 * result + (maxPrice.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 Consent
if (currency != other.currency) return false
if (!(maxPrice?.equals(other.maxPrice) ?: (other.maxPrice == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53domains.model.Consent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Currency for the `MaxPrice`.
*/
public var currency: kotlin.String? = null
/**
* Maximum amount the customer agreed to accept.
*/
public var maxPrice: kotlin.Double = 0.0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53domains.model.Consent) : this() {
this.currency = x.currency
this.maxPrice = x.maxPrice
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53domains.model.Consent = Consent(this)
internal fun correctErrors(): Builder {
if (currency == null) currency = ""
return this
}
}
}