commonMain.aws.sdk.kotlin.services.cleanrooms.model.Membership.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 membership object.
*/
public class Membership private constructor(builder: Builder) {
/**
* The unique ARN for the membership.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The unique ARN for the membership's associated collaboration.
*/
public val collaborationArn: kotlin.String = requireNotNull(builder.collaborationArn) { "A non-null value must be provided for collaborationArn" }
/**
* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
*/
public val collaborationCreatorAccountId: kotlin.String = requireNotNull(builder.collaborationCreatorAccountId) { "A non-null value must be provided for collaborationCreatorAccountId" }
/**
* The display name of the collaboration creator.
*/
public val collaborationCreatorDisplayName: kotlin.String = requireNotNull(builder.collaborationCreatorDisplayName) { "A non-null value must be provided for collaborationCreatorDisplayName" }
/**
* The unique ID for the membership's collaboration.
*/
public val collaborationId: kotlin.String = requireNotNull(builder.collaborationId) { "A non-null value must be provided for collaborationId" }
/**
* The name of the membership's collaboration.
*/
public val collaborationName: kotlin.String = requireNotNull(builder.collaborationName) { "A non-null value must be provided for collaborationName" }
/**
* The time when the membership was created.
*/
public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
/**
* The default protected query result configuration as specified by the member who can receive results.
*/
public val defaultResultConfiguration: aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration? = builder.defaultResultConfiguration
/**
* The unique ID of the membership.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* The abilities granted to the collaboration member.
*/
public val memberAbilities: List = requireNotNull(builder.memberAbilities) { "A non-null value must be provided for memberAbilities" }
/**
* The payment responsibilities accepted by the collaboration member.
*/
public val paymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration? = builder.paymentConfiguration
/**
* An indicator as to whether query logging has been enabled or disabled for the membership.
*/
public val queryLogStatus: aws.sdk.kotlin.services.cleanrooms.model.MembershipQueryLogStatus = requireNotNull(builder.queryLogStatus) { "A non-null value must be provided for queryLogStatus" }
/**
* The status of the membership.
*/
public val status: aws.sdk.kotlin.services.cleanrooms.model.MembershipStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* The time the membership 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.Membership = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Membership(")
append("arn=$arn,")
append("collaborationArn=$collaborationArn,")
append("collaborationCreatorAccountId=$collaborationCreatorAccountId,")
append("collaborationCreatorDisplayName=$collaborationCreatorDisplayName,")
append("collaborationId=$collaborationId,")
append("collaborationName=$collaborationName,")
append("createTime=$createTime,")
append("defaultResultConfiguration=$defaultResultConfiguration,")
append("id=$id,")
append("memberAbilities=$memberAbilities,")
append("paymentConfiguration=$paymentConfiguration,")
append("queryLogStatus=$queryLogStatus,")
append("status=$status,")
append("updateTime=$updateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (collaborationArn.hashCode())
result = 31 * result + (collaborationCreatorAccountId.hashCode())
result = 31 * result + (collaborationCreatorDisplayName.hashCode())
result = 31 * result + (collaborationId.hashCode())
result = 31 * result + (collaborationName.hashCode())
result = 31 * result + (createTime.hashCode())
result = 31 * result + (defaultResultConfiguration?.hashCode() ?: 0)
result = 31 * result + (id.hashCode())
result = 31 * result + (memberAbilities.hashCode())
result = 31 * result + (paymentConfiguration?.hashCode() ?: 0)
result = 31 * result + (queryLogStatus.hashCode())
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 Membership
if (arn != other.arn) return false
if (collaborationArn != other.collaborationArn) return false
if (collaborationCreatorAccountId != other.collaborationCreatorAccountId) return false
if (collaborationCreatorDisplayName != other.collaborationCreatorDisplayName) return false
if (collaborationId != other.collaborationId) return false
if (collaborationName != other.collaborationName) return false
if (createTime != other.createTime) return false
if (defaultResultConfiguration != other.defaultResultConfiguration) return false
if (id != other.id) return false
if (memberAbilities != other.memberAbilities) return false
if (paymentConfiguration != other.paymentConfiguration) return false
if (queryLogStatus != other.queryLogStatus) 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.Membership = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique ARN for the membership.
*/
public var arn: kotlin.String? = null
/**
* The unique ARN for the membership's associated collaboration.
*/
public var collaborationArn: kotlin.String? = null
/**
* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
*/
public var collaborationCreatorAccountId: kotlin.String? = null
/**
* The display name of the collaboration creator.
*/
public var collaborationCreatorDisplayName: kotlin.String? = null
/**
* The unique ID for the membership's collaboration.
*/
public var collaborationId: kotlin.String? = null
/**
* The name of the membership's collaboration.
*/
public var collaborationName: kotlin.String? = null
/**
* The time when the membership was created.
*/
public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The default protected query result configuration as specified by the member who can receive results.
*/
public var defaultResultConfiguration: aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration? = null
/**
* The unique ID of the membership.
*/
public var id: kotlin.String? = null
/**
* The abilities granted to the collaboration member.
*/
public var memberAbilities: List? = null
/**
* The payment responsibilities accepted by the collaboration member.
*/
public var paymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration? = null
/**
* An indicator as to whether query logging has been enabled or disabled for the membership.
*/
public var queryLogStatus: aws.sdk.kotlin.services.cleanrooms.model.MembershipQueryLogStatus? = null
/**
* The status of the membership.
*/
public var status: aws.sdk.kotlin.services.cleanrooms.model.MembershipStatus? = null
/**
* The time the membership 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.Membership) : this() {
this.arn = x.arn
this.collaborationArn = x.collaborationArn
this.collaborationCreatorAccountId = x.collaborationCreatorAccountId
this.collaborationCreatorDisplayName = x.collaborationCreatorDisplayName
this.collaborationId = x.collaborationId
this.collaborationName = x.collaborationName
this.createTime = x.createTime
this.defaultResultConfiguration = x.defaultResultConfiguration
this.id = x.id
this.memberAbilities = x.memberAbilities
this.paymentConfiguration = x.paymentConfiguration
this.queryLogStatus = x.queryLogStatus
this.status = x.status
this.updateTime = x.updateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.Membership = Membership(this)
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration] inside the given [block]
*/
public fun defaultResultConfiguration(block: aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration.Builder.() -> kotlin.Unit) {
this.defaultResultConfiguration = aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration] inside the given [block]
*/
public fun paymentConfiguration(block: aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration.Builder.() -> kotlin.Unit) {
this.paymentConfiguration = aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (collaborationArn == null) collaborationArn = ""
if (collaborationCreatorAccountId == null) collaborationCreatorAccountId = ""
if (collaborationCreatorDisplayName == null) collaborationCreatorDisplayName = ""
if (collaborationId == null) collaborationId = ""
if (collaborationName == null) collaborationName = ""
if (createTime == null) createTime = Instant.fromEpochSeconds(0)
if (id == null) id = ""
if (memberAbilities == null) memberAbilities = emptyList()
if (queryLogStatus == null) queryLogStatus = MembershipQueryLogStatus.SdkUnknown("no value provided")
if (status == null) status = MembershipStatus.SdkUnknown("no value provided")
if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
return this
}
}
}