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

commonMain.aws.sdk.kotlin.services.auditmanager.model.ControlComment.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.auditmanager.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * A comment that's posted by a user on a control. This includes the author's name, the comment text, and a timestamp.
 */
public class ControlComment private constructor(builder: Builder) {
    /**
     * The name of the user who authored the comment.
     */
    public val authorName: kotlin.String? = builder.authorName
    /**
     * The body text of a control comment.
     */
    public val commentBody: kotlin.String? = builder.commentBody
    /**
     * The time when the comment was posted.
     */
    public val postedDate: aws.smithy.kotlin.runtime.time.Instant? = builder.postedDate

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

    override fun toString(): kotlin.String = buildString {
        append("ControlComment(")
        append("authorName=*** Sensitive Data Redacted ***,")
        append("commentBody=*** Sensitive Data Redacted ***,")
        append("postedDate=$postedDate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = authorName?.hashCode() ?: 0
        result = 31 * result + (commentBody?.hashCode() ?: 0)
        result = 31 * result + (postedDate?.hashCode() ?: 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 ControlComment

        if (authorName != other.authorName) return false
        if (commentBody != other.commentBody) return false
        if (postedDate != other.postedDate) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the user who authored the comment.
         */
        public var authorName: kotlin.String? = null
        /**
         * The body text of a control comment.
         */
        public var commentBody: kotlin.String? = null
        /**
         * The time when the comment was posted.
         */
        public var postedDate: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.auditmanager.model.ControlComment) : this() {
            this.authorName = x.authorName
            this.commentBody = x.commentBody
            this.postedDate = x.postedDate
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy