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

commonMain.aws.sdk.kotlin.services.ssmcontacts.model.DescribeEngagementResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssmcontacts.model

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

public class DescribeEngagementResponse private constructor(builder: Builder) {
    /**
     * The ARN of the escalation plan or contacts involved in the engagement.
     */
    public val contactArn: kotlin.String = requireNotNull(builder.contactArn) { "A non-null value must be provided for contactArn" }
    /**
     * The secure content of the message that was sent to the contact. Use this field for engagements to `VOICE` and `EMAIL`.
     */
    public val content: kotlin.String = requireNotNull(builder.content) { "A non-null value must be provided for content" }
    /**
     * The ARN of the engagement.
     */
    public val engagementArn: kotlin.String = requireNotNull(builder.engagementArn) { "A non-null value must be provided for engagementArn" }
    /**
     * The ARN of the incident in which the engagement occurred.
     */
    public val incidentId: kotlin.String? = builder.incidentId
    /**
     * The insecure content of the message that was sent to the contact. Use this field for engagements to `SMS`.
     */
    public val publicContent: kotlin.String? = builder.publicContent
    /**
     * The insecure subject of the message that was sent to the contact. Use this field for engagements to `SMS`.
     */
    public val publicSubject: kotlin.String? = builder.publicSubject
    /**
     * The user that started the engagement.
     */
    public val sender: kotlin.String = requireNotNull(builder.sender) { "A non-null value must be provided for sender" }
    /**
     * The time that the engagement started.
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
    /**
     * The time that the engagement ended.
     */
    public val stopTime: aws.smithy.kotlin.runtime.time.Instant? = builder.stopTime
    /**
     * The secure subject of the message that was sent to the contact. Use this field for engagements to `VOICE` and `EMAIL`.
     */
    public val subject: kotlin.String = requireNotNull(builder.subject) { "A non-null value must be provided for subject" }

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeEngagementResponse(")
        append("contactArn=$contactArn,")
        append("content=$content,")
        append("engagementArn=$engagementArn,")
        append("incidentId=$incidentId,")
        append("publicContent=$publicContent,")
        append("publicSubject=$publicSubject,")
        append("sender=$sender,")
        append("startTime=$startTime,")
        append("stopTime=$stopTime,")
        append("subject=$subject")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = contactArn.hashCode()
        result = 31 * result + (content.hashCode())
        result = 31 * result + (engagementArn.hashCode())
        result = 31 * result + (incidentId?.hashCode() ?: 0)
        result = 31 * result + (publicContent?.hashCode() ?: 0)
        result = 31 * result + (publicSubject?.hashCode() ?: 0)
        result = 31 * result + (sender.hashCode())
        result = 31 * result + (startTime?.hashCode() ?: 0)
        result = 31 * result + (stopTime?.hashCode() ?: 0)
        result = 31 * result + (subject.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 DescribeEngagementResponse

        if (contactArn != other.contactArn) return false
        if (content != other.content) return false
        if (engagementArn != other.engagementArn) return false
        if (incidentId != other.incidentId) return false
        if (publicContent != other.publicContent) return false
        if (publicSubject != other.publicSubject) return false
        if (sender != other.sender) return false
        if (startTime != other.startTime) return false
        if (stopTime != other.stopTime) return false
        if (subject != other.subject) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the escalation plan or contacts involved in the engagement.
         */
        public var contactArn: kotlin.String? = null
        /**
         * The secure content of the message that was sent to the contact. Use this field for engagements to `VOICE` and `EMAIL`.
         */
        public var content: kotlin.String? = null
        /**
         * The ARN of the engagement.
         */
        public var engagementArn: kotlin.String? = null
        /**
         * The ARN of the incident in which the engagement occurred.
         */
        public var incidentId: kotlin.String? = null
        /**
         * The insecure content of the message that was sent to the contact. Use this field for engagements to `SMS`.
         */
        public var publicContent: kotlin.String? = null
        /**
         * The insecure subject of the message that was sent to the contact. Use this field for engagements to `SMS`.
         */
        public var publicSubject: kotlin.String? = null
        /**
         * The user that started the engagement.
         */
        public var sender: kotlin.String? = null
        /**
         * The time that the engagement started.
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time that the engagement ended.
         */
        public var stopTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The secure subject of the message that was sent to the contact. Use this field for engagements to `VOICE` and `EMAIL`.
         */
        public var subject: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.DescribeEngagementResponse) : this() {
            this.contactArn = x.contactArn
            this.content = x.content
            this.engagementArn = x.engagementArn
            this.incidentId = x.incidentId
            this.publicContent = x.publicContent
            this.publicSubject = x.publicSubject
            this.sender = x.sender
            this.startTime = x.startTime
            this.stopTime = x.stopTime
            this.subject = x.subject
        }

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

        internal fun correctErrors(): Builder {
            if (contactArn == null) contactArn = ""
            if (content == null) content = ""
            if (engagementArn == null) engagementArn = ""
            if (sender == null) sender = ""
            if (subject == null) subject = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy