commonMain.aws.sdk.kotlin.services.acm.model.PutAccountConfigurationRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of acm-jvm Show documentation
Show all versions of acm-jvm Show documentation
The AWS Kotlin client for ACM
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.acm.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutAccountConfigurationRequest private constructor(builder: Builder) {
/**
* Specifies expiration events associated with an account.
*/
public val expiryEvents: aws.sdk.kotlin.services.acm.model.ExpiryEventsConfiguration? = builder.expiryEvents
/**
* Customer-chosen string used to distinguish between calls to `PutAccountConfiguration`. Idempotency tokens time out after one hour. If you call `PutAccountConfiguration` multiple times with the same unexpired idempotency token, ACM treats it as the same request and returns the original result. If you change the idempotency token for each call, ACM treats each call as a new request.
*/
public val idempotencyToken: kotlin.String? = builder.idempotencyToken
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.acm.model.PutAccountConfigurationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutAccountConfigurationRequest(")
append("expiryEvents=$expiryEvents,")
append("idempotencyToken=$idempotencyToken")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = expiryEvents?.hashCode() ?: 0
result = 31 * result + (idempotencyToken?.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 PutAccountConfigurationRequest
if (expiryEvents != other.expiryEvents) return false
if (idempotencyToken != other.idempotencyToken) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.acm.model.PutAccountConfigurationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies expiration events associated with an account.
*/
public var expiryEvents: aws.sdk.kotlin.services.acm.model.ExpiryEventsConfiguration? = null
/**
* Customer-chosen string used to distinguish between calls to `PutAccountConfiguration`. Idempotency tokens time out after one hour. If you call `PutAccountConfiguration` multiple times with the same unexpired idempotency token, ACM treats it as the same request and returns the original result. If you change the idempotency token for each call, ACM treats each call as a new request.
*/
public var idempotencyToken: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.acm.model.PutAccountConfigurationRequest) : this() {
this.expiryEvents = x.expiryEvents
this.idempotencyToken = x.idempotencyToken
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.acm.model.PutAccountConfigurationRequest = PutAccountConfigurationRequest(this)
/**
* construct an [aws.sdk.kotlin.services.acm.model.ExpiryEventsConfiguration] inside the given [block]
*/
public fun expiryEvents(block: aws.sdk.kotlin.services.acm.model.ExpiryEventsConfiguration.Builder.() -> kotlin.Unit) {
this.expiryEvents = aws.sdk.kotlin.services.acm.model.ExpiryEventsConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}