commonMain.aws.sdk.kotlin.services.cleanrooms.model.MemberSpecification.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanrooms-jvm Show documentation
Show all versions of cleanrooms-jvm Show documentation
The AWS SDK for Kotlin client for CleanRooms
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanrooms.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Basic metadata used to construct a new member.
*/
public class MemberSpecification private constructor(builder: Builder) {
/**
* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
*/
public val accountId: kotlin.String = requireNotNull(builder.accountId) { "A non-null value must be provided for accountId" }
/**
* The member's display name.
*/
public val displayName: kotlin.String = requireNotNull(builder.displayName) { "A non-null value must be provided for displayName" }
/**
* The abilities granted to the collaboration member.
*/
public val memberAbilities: List = requireNotNull(builder.memberAbilities) { "A non-null value must be provided for memberAbilities" }
/**
* The collaboration member's payment responsibilities set by the collaboration creator.
*
* If the collaboration creator hasn't specified anyone as the member paying for query compute costs, then the member who can query is the default payer.
*/
public val paymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration? = builder.paymentConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.MemberSpecification = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MemberSpecification(")
append("accountId=$accountId,")
append("displayName=$displayName,")
append("memberAbilities=$memberAbilities,")
append("paymentConfiguration=$paymentConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accountId.hashCode()
result = 31 * result + (displayName.hashCode())
result = 31 * result + (memberAbilities.hashCode())
result = 31 * result + (paymentConfiguration?.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 MemberSpecification
if (accountId != other.accountId) return false
if (displayName != other.displayName) return false
if (memberAbilities != other.memberAbilities) return false
if (paymentConfiguration != other.paymentConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.MemberSpecification = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
*/
public var accountId: kotlin.String? = null
/**
* The member's display name.
*/
public var displayName: kotlin.String? = null
/**
* The abilities granted to the collaboration member.
*/
public var memberAbilities: List? = null
/**
* The collaboration member's payment responsibilities set by the collaboration creator.
*
* If the collaboration creator hasn't specified anyone as the member paying for query compute costs, then the member who can query is the default payer.
*/
public var paymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.MemberSpecification) : this() {
this.accountId = x.accountId
this.displayName = x.displayName
this.memberAbilities = x.memberAbilities
this.paymentConfiguration = x.paymentConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.MemberSpecification = MemberSpecification(this)
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration] inside the given [block]
*/
public fun paymentConfiguration(block: aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration.Builder.() -> kotlin.Unit) {
this.paymentConfiguration = aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
if (accountId == null) accountId = ""
if (displayName == null) displayName = ""
if (memberAbilities == null) memberAbilities = emptyList()
return this
}
}
}