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

commonMain.aws.sdk.kotlin.services.ssmcontacts.model.StartEngagementRequest.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

public class StartEngagementRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the contact being engaged.
     */
    public val contactId: kotlin.String? = builder.contactId
    /**
     * The secure content of the message that was sent to the contact. Use this field for engagements to `VOICE` or `EMAIL`.
     */
    public val content: kotlin.String? = builder.content
    /**
     * A token ensuring that the operation is called only once with the specified details.
     */
    public val idempotencyToken: kotlin.String? = builder.idempotencyToken
    /**
     * The ARN of the incident that the engagement is part of.
     */
    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? = builder.sender
    /**
     * The secure subject of the message that was sent to the contact. Use this field for engagements to `VOICE` or `EMAIL`.
     */
    public val subject: kotlin.String? = builder.subject

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

    override fun toString(): kotlin.String = buildString {
        append("StartEngagementRequest(")
        append("contactId=$contactId,")
        append("content=$content,")
        append("idempotencyToken=$idempotencyToken,")
        append("incidentId=$incidentId,")
        append("publicContent=$publicContent,")
        append("publicSubject=$publicSubject,")
        append("sender=$sender,")
        append("subject=$subject")
        append(")")
    }

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

        if (contactId != other.contactId) return false
        if (content != other.content) return false
        if (idempotencyToken != other.idempotencyToken) 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 (subject != other.subject) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the contact being engaged.
         */
        public var contactId: kotlin.String? = null
        /**
         * The secure content of the message that was sent to the contact. Use this field for engagements to `VOICE` or `EMAIL`.
         */
        public var content: kotlin.String? = null
        /**
         * A token ensuring that the operation is called only once with the specified details.
         */
        public var idempotencyToken: kotlin.String? = null
        /**
         * The ARN of the incident that the engagement is part of.
         */
        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 secure subject of the message that was sent to the contact. Use this field for engagements to `VOICE` or `EMAIL`.
         */
        public var subject: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.StartEngagementRequest) : this() {
            this.contactId = x.contactId
            this.content = x.content
            this.idempotencyToken = x.idempotencyToken
            this.incidentId = x.incidentId
            this.publicContent = x.publicContent
            this.publicSubject = x.publicSubject
            this.sender = x.sender
            this.subject = x.subject
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy