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

commonMain.aws.sdk.kotlin.services.codecommit.model.ReactionForComment.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codecommit.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about the reaction values provided by users on a comment.
 */
public class ReactionForComment private constructor(builder: Builder) {
    /**
     * The reaction for a specified comment.
     */
    public val reaction: aws.sdk.kotlin.services.codecommit.model.ReactionValueFormats? = builder.reaction
    /**
     * The Amazon Resource Names (ARNs) of users who have provided reactions to the comment.
     */
    public val reactionUsers: List? = builder.reactionUsers
    /**
     * A numerical count of users who reacted with the specified emoji whose identities have been subsequently deleted from IAM. While these IAM users or roles no longer exist, the reactions might still appear in total reaction counts.
     */
    public val reactionsFromDeletedUsersCount: kotlin.Int? = builder.reactionsFromDeletedUsersCount

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.ReactionForComment = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ReactionForComment(")
        append("reaction=$reaction,")
        append("reactionUsers=$reactionUsers,")
        append("reactionsFromDeletedUsersCount=$reactionsFromDeletedUsersCount")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = reaction?.hashCode() ?: 0
        result = 31 * result + (reactionUsers?.hashCode() ?: 0)
        result = 31 * result + (reactionsFromDeletedUsersCount ?: 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 ReactionForComment

        if (reaction != other.reaction) return false
        if (reactionUsers != other.reactionUsers) return false
        if (reactionsFromDeletedUsersCount != other.reactionsFromDeletedUsersCount) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The reaction for a specified comment.
         */
        public var reaction: aws.sdk.kotlin.services.codecommit.model.ReactionValueFormats? = null
        /**
         * The Amazon Resource Names (ARNs) of users who have provided reactions to the comment.
         */
        public var reactionUsers: List? = null
        /**
         * A numerical count of users who reacted with the specified emoji whose identities have been subsequently deleted from IAM. While these IAM users or roles no longer exist, the reactions might still appear in total reaction counts.
         */
        public var reactionsFromDeletedUsersCount: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.ReactionForComment) : this() {
            this.reaction = x.reaction
            this.reactionUsers = x.reactionUsers
            this.reactionsFromDeletedUsersCount = x.reactionsFromDeletedUsersCount
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.codecommit.model.ReactionValueFormats] inside the given [block]
         */
        public fun reaction(block: aws.sdk.kotlin.services.codecommit.model.ReactionValueFormats.Builder.() -> kotlin.Unit) {
            this.reaction = aws.sdk.kotlin.services.codecommit.model.ReactionValueFormats.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy