commonMain.aws.sdk.kotlin.services.partnercentralselling.model.CustomerSummary.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of partnercentralselling-jvm Show documentation
Show all versions of partnercentralselling-jvm Show documentation
The AWS SDK for Kotlin client for PartnerCentral Selling
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.partnercentralselling.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object that contains a `Customer` object's subset of fields.
*/
public class CustomerSummary private constructor(builder: Builder) {
/**
* An object that contains a customer's account details.
*/
public val account: aws.sdk.kotlin.services.partnercentralselling.model.AccountSummary? = builder.account
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.partnercentralselling.model.CustomerSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CustomerSummary(")
append("account=$account")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = account?.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 CustomerSummary
if (account != other.account) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.partnercentralselling.model.CustomerSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An object that contains a customer's account details.
*/
public var account: aws.sdk.kotlin.services.partnercentralselling.model.AccountSummary? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.partnercentralselling.model.CustomerSummary) : this() {
this.account = x.account
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.partnercentralselling.model.CustomerSummary = CustomerSummary(this)
/**
* construct an [aws.sdk.kotlin.services.partnercentralselling.model.AccountSummary] inside the given [block]
*/
public fun account(block: aws.sdk.kotlin.services.partnercentralselling.model.AccountSummary.Builder.() -> kotlin.Unit) {
this.account = aws.sdk.kotlin.services.partnercentralselling.model.AccountSummary.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}