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

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

/**
 * Incident Manager engaging a contact's contact channel.
 */
public class Page private constructor(builder: Builder) {
    /**
     * The ARN of the contact that Incident Manager is engaging.
     */
    public val contactArn: kotlin.String = requireNotNull(builder.contactArn) { "A non-null value must be provided for contactArn" }
    /**
     * The time the message was delivered to the contact channel.
     */
    public val deliveryTime: aws.smithy.kotlin.runtime.time.Instant? = builder.deliveryTime
    /**
     * The ARN of the engagement that this page is part of.
     */
    public val engagementArn: kotlin.String = requireNotNull(builder.engagementArn) { "A non-null value must be provided for engagementArn" }
    /**
     * The ARN of the incident that's engaging the contact channel.
     */
    public val incidentId: kotlin.String? = builder.incidentId
    /**
     * The Amazon Resource Name (ARN) of the page to the contact channel.
     */
    public val pageArn: kotlin.String = requireNotNull(builder.pageArn) { "A non-null value must be provided for pageArn" }
    /**
     * The time that the contact channel acknowledged engagement.
     */
    public val readTime: aws.smithy.kotlin.runtime.time.Instant? = builder.readTime
    /**
     * 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 Incident Manager engaged the contact channel.
     */
    public val sentTime: aws.smithy.kotlin.runtime.time.Instant? = builder.sentTime

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

    override fun toString(): kotlin.String = buildString {
        append("Page(")
        append("contactArn=$contactArn,")
        append("deliveryTime=$deliveryTime,")
        append("engagementArn=$engagementArn,")
        append("incidentId=$incidentId,")
        append("pageArn=$pageArn,")
        append("readTime=$readTime,")
        append("sender=$sender,")
        append("sentTime=$sentTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = contactArn.hashCode()
        result = 31 * result + (deliveryTime?.hashCode() ?: 0)
        result = 31 * result + (engagementArn.hashCode())
        result = 31 * result + (incidentId?.hashCode() ?: 0)
        result = 31 * result + (pageArn.hashCode())
        result = 31 * result + (readTime?.hashCode() ?: 0)
        result = 31 * result + (sender.hashCode())
        result = 31 * result + (sentTime?.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 Page

        if (contactArn != other.contactArn) return false
        if (deliveryTime != other.deliveryTime) return false
        if (engagementArn != other.engagementArn) return false
        if (incidentId != other.incidentId) return false
        if (pageArn != other.pageArn) return false
        if (readTime != other.readTime) return false
        if (sender != other.sender) return false
        if (sentTime != other.sentTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the contact that Incident Manager is engaging.
         */
        public var contactArn: kotlin.String? = null
        /**
         * The time the message was delivered to the contact channel.
         */
        public var deliveryTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ARN of the engagement that this page is part of.
         */
        public var engagementArn: kotlin.String? = null
        /**
         * The ARN of the incident that's engaging the contact channel.
         */
        public var incidentId: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the page to the contact channel.
         */
        public var pageArn: kotlin.String? = null
        /**
         * The time that the contact channel acknowledged engagement.
         */
        public var readTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The user that started the engagement.
         */
        public var sender: kotlin.String? = null
        /**
         * The time that Incident Manager engaged the contact channel.
         */
        public var sentTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.Page) : this() {
            this.contactArn = x.contactArn
            this.deliveryTime = x.deliveryTime
            this.engagementArn = x.engagementArn
            this.incidentId = x.incidentId
            this.pageArn = x.pageArn
            this.readTime = x.readTime
            this.sender = x.sender
            this.sentTime = x.sentTime
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy