commonMain.aws.sdk.kotlin.services.cleanrooms.model.MemberSummary.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* The member object listed by the request.
*/
public class MemberSummary private constructor(builder: Builder) {
/**
* The abilities granted to the collaboration member.
*/
public val abilities: List = requireNotNull(builder.abilities) { "A non-null value must be provided for abilities" }
/**
* 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 time when the member was created.
*/
public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
/**
* The member's display name.
*/
public val displayName: kotlin.String = requireNotNull(builder.displayName) { "A non-null value must be provided for displayName" }
/**
* The unique ARN for the member's associated membership, if present.
*/
public val membershipArn: kotlin.String? = builder.membershipArn
/**
* The unique ID for the member's associated membership, if present.
*/
public val membershipId: kotlin.String? = builder.membershipId
/**
* The collaboration member's payment responsibilities set by the collaboration creator.
*/
public val paymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration? = builder.paymentConfiguration
/**
* The status of the member.
*/
public val status: aws.sdk.kotlin.services.cleanrooms.model.MemberStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* The time the member metadata was last updated.
*/
public val updateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateTime) { "A non-null value must be provided for updateTime" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.MemberSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MemberSummary(")
append("abilities=$abilities,")
append("accountId=$accountId,")
append("createTime=$createTime,")
append("displayName=$displayName,")
append("membershipArn=$membershipArn,")
append("membershipId=$membershipId,")
append("paymentConfiguration=$paymentConfiguration,")
append("status=$status,")
append("updateTime=$updateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = abilities.hashCode()
result = 31 * result + (accountId.hashCode())
result = 31 * result + (createTime.hashCode())
result = 31 * result + (displayName.hashCode())
result = 31 * result + (membershipArn?.hashCode() ?: 0)
result = 31 * result + (membershipId?.hashCode() ?: 0)
result = 31 * result + (paymentConfiguration?.hashCode() ?: 0)
result = 31 * result + (status.hashCode())
result = 31 * result + (updateTime.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 MemberSummary
if (abilities != other.abilities) return false
if (accountId != other.accountId) return false
if (createTime != other.createTime) return false
if (displayName != other.displayName) return false
if (membershipArn != other.membershipArn) return false
if (membershipId != other.membershipId) return false
if (paymentConfiguration != other.paymentConfiguration) return false
if (status != other.status) return false
if (updateTime != other.updateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.MemberSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The abilities granted to the collaboration member.
*/
public var abilities: List? = null
/**
* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
*/
public var accountId: kotlin.String? = null
/**
* The time when the member was created.
*/
public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The member's display name.
*/
public var displayName: kotlin.String? = null
/**
* The unique ARN for the member's associated membership, if present.
*/
public var membershipArn: kotlin.String? = null
/**
* The unique ID for the member's associated membership, if present.
*/
public var membershipId: kotlin.String? = null
/**
* The collaboration member's payment responsibilities set by the collaboration creator.
*/
public var paymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration? = null
/**
* The status of the member.
*/
public var status: aws.sdk.kotlin.services.cleanrooms.model.MemberStatus? = null
/**
* The time the member metadata was last updated.
*/
public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.MemberSummary) : this() {
this.abilities = x.abilities
this.accountId = x.accountId
this.createTime = x.createTime
this.displayName = x.displayName
this.membershipArn = x.membershipArn
this.membershipId = x.membershipId
this.paymentConfiguration = x.paymentConfiguration
this.status = x.status
this.updateTime = x.updateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.MemberSummary = MemberSummary(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 (abilities == null) abilities = emptyList()
if (accountId == null) accountId = ""
if (createTime == null) createTime = Instant.fromEpochSeconds(0)
if (displayName == null) displayName = ""
if (status == null) status = MemberStatus.SdkUnknown("no value provided")
if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
return this
}
}
}