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

commonMain.aws.sdk.kotlin.services.cleanrooms.model.CollaborationSummary.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 metadata of the collaboration.
 */
public class CollaborationSummary private constructor(builder: Builder) {
    /**
     * The ARN of the collaboration.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The time when the collaboration was created.
     */
    public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
    /**
     * The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
     */
    public val creatorAccountId: kotlin.String = requireNotNull(builder.creatorAccountId) { "A non-null value must be provided for creatorAccountId" }
    /**
     * The display name of the collaboration creator.
     */
    public val creatorDisplayName: kotlin.String = requireNotNull(builder.creatorDisplayName) { "A non-null value must be provided for creatorDisplayName" }
    /**
     * The identifier for the collaboration.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The status of a member in a collaboration.
     */
    public val memberStatus: aws.sdk.kotlin.services.cleanrooms.model.MemberStatus = requireNotNull(builder.memberStatus) { "A non-null value must be provided for memberStatus" }
    /**
     * The ARN of a member in a collaboration.
     */
    public val membershipArn: kotlin.String? = builder.membershipArn
    /**
     * The identifier of a member in a collaboration.
     */
    public val membershipId: kotlin.String? = builder.membershipId
    /**
     * A human-readable identifier provided by the collaboration owner. Display names are not unique.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The time the collaboration 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.CollaborationSummary = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CollaborationSummary(")
        append("arn=$arn,")
        append("createTime=$createTime,")
        append("creatorAccountId=$creatorAccountId,")
        append("creatorDisplayName=$creatorDisplayName,")
        append("id=$id,")
        append("memberStatus=$memberStatus,")
        append("membershipArn=$membershipArn,")
        append("membershipId=$membershipId,")
        append("name=$name,")
        append("updateTime=$updateTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (createTime.hashCode())
        result = 31 * result + (creatorAccountId.hashCode())
        result = 31 * result + (creatorDisplayName.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (memberStatus.hashCode())
        result = 31 * result + (membershipArn?.hashCode() ?: 0)
        result = 31 * result + (membershipId?.hashCode() ?: 0)
        result = 31 * result + (name.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 CollaborationSummary

        if (arn != other.arn) return false
        if (createTime != other.createTime) return false
        if (creatorAccountId != other.creatorAccountId) return false
        if (creatorDisplayName != other.creatorDisplayName) return false
        if (id != other.id) return false
        if (memberStatus != other.memberStatus) return false
        if (membershipArn != other.membershipArn) return false
        if (membershipId != other.membershipId) return false
        if (name != other.name) return false
        if (updateTime != other.updateTime) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.CollaborationSummary = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the collaboration.
         */
        public var arn: kotlin.String? = null
        /**
         * The time when the collaboration was created.
         */
        public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
         */
        public var creatorAccountId: kotlin.String? = null
        /**
         * The display name of the collaboration creator.
         */
        public var creatorDisplayName: kotlin.String? = null
        /**
         * The identifier for the collaboration.
         */
        public var id: kotlin.String? = null
        /**
         * The status of a member in a collaboration.
         */
        public var memberStatus: aws.sdk.kotlin.services.cleanrooms.model.MemberStatus? = null
        /**
         * The ARN of a member in a collaboration.
         */
        public var membershipArn: kotlin.String? = null
        /**
         * The identifier of a member in a collaboration.
         */
        public var membershipId: kotlin.String? = null
        /**
         * A human-readable identifier provided by the collaboration owner. Display names are not unique.
         */
        public var name: kotlin.String? = null
        /**
         * The time the collaboration 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.CollaborationSummary) : this() {
            this.arn = x.arn
            this.createTime = x.createTime
            this.creatorAccountId = x.creatorAccountId
            this.creatorDisplayName = x.creatorDisplayName
            this.id = x.id
            this.memberStatus = x.memberStatus
            this.membershipArn = x.membershipArn
            this.membershipId = x.membershipId
            this.name = x.name
            this.updateTime = x.updateTime
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (createTime == null) createTime = Instant.fromEpochSeconds(0)
            if (creatorAccountId == null) creatorAccountId = ""
            if (creatorDisplayName == null) creatorDisplayName = ""
            if (id == null) id = ""
            if (memberStatus == null) memberStatus = MemberStatus.SdkUnknown("no value provided")
            if (name == null) name = ""
            if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy