commonMain.aws.sdk.kotlin.services.chatbot.model.GetAccountPreferencesResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.chatbot.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetAccountPreferencesResponse private constructor(builder: Builder) {
/**
* The preferences related to AWS Chatbot usage in the calling AWS account.
*/
public val accountPreferences: aws.sdk.kotlin.services.chatbot.model.AccountPreferences? = builder.accountPreferences
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chatbot.model.GetAccountPreferencesResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetAccountPreferencesResponse(")
append("accountPreferences=$accountPreferences")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accountPreferences?.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 GetAccountPreferencesResponse
if (accountPreferences != other.accountPreferences) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chatbot.model.GetAccountPreferencesResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The preferences related to AWS Chatbot usage in the calling AWS account.
*/
public var accountPreferences: aws.sdk.kotlin.services.chatbot.model.AccountPreferences? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chatbot.model.GetAccountPreferencesResponse) : this() {
this.accountPreferences = x.accountPreferences
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chatbot.model.GetAccountPreferencesResponse = GetAccountPreferencesResponse(this)
/**
* construct an [aws.sdk.kotlin.services.chatbot.model.AccountPreferences] inside the given [block]
*/
public fun accountPreferences(block: aws.sdk.kotlin.services.chatbot.model.AccountPreferences.Builder.() -> kotlin.Unit) {
this.accountPreferences = aws.sdk.kotlin.services.chatbot.model.AccountPreferences.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}