All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.cleanrooms.model.MembershipSummary.kt Maven / Gradle / Ivy

There is a newer version: 1.3.31
Show newest version
// 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 listed by the request.
 */
public class MembershipSummary 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 of the Amazon Web Services principal that created 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 for 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 unique ID for the membership's collaboration.
     */
    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
    /**
     * 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.MembershipSummary = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("MembershipSummary(")
        append("arn=$arn,")
        append("collaborationArn=$collaborationArn,")
        append("collaborationCreatorAccountId=$collaborationCreatorAccountId,")
        append("collaborationCreatorDisplayName=$collaborationCreatorDisplayName,")
        append("collaborationId=$collaborationId,")
        append("collaborationName=$collaborationName,")
        append("createTime=$createTime,")
        append("id=$id,")
        append("memberAbilities=$memberAbilities,")
        append("paymentConfiguration=$paymentConfiguration,")
        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 + (id.hashCode())
        result = 31 * result + (memberAbilities.hashCode())
        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 MembershipSummary

        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 (id != other.id) return false
        if (memberAbilities != other.memberAbilities) 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.MembershipSummary = 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 of the Amazon Web Services principal that created 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 for 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 unique ID for the membership's collaboration.
         */
        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
        /**
         * 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.MembershipSummary) : 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.id = x.id
            this.memberAbilities = x.memberAbilities
            this.paymentConfiguration = x.paymentConfiguration
            this.status = x.status
            this.updateTime = x.updateTime
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.MembershipSummary = MembershipSummary(this)

        /**
         * 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 (status == null) status = MembershipStatus.SdkUnknown("no value provided")
            if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy