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

commonMain.aws.sdk.kotlin.services.iotwireless.model.DownlinkQueueMessage.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotwireless.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The message in the downlink queue.
 */
public class DownlinkQueueMessage private constructor(builder: Builder) {
    /**
     * LoRaWAN router info.
     */
    public val loRaWan: aws.sdk.kotlin.services.iotwireless.model.LoRaWanSendDataToDevice? = builder.loRaWan
    /**
     * The message ID assigned by IoT Wireless to each downlink message, which helps identify the message.
     */
    public val messageId: kotlin.String? = builder.messageId
    /**
     * The time at which Iot Wireless received the downlink message.
     */
    public val receivedAt: kotlin.String? = builder.receivedAt
    /**
     * The transmit mode to use for sending data to the wireless device. This can be `0` for UM (unacknowledge mode) or `1` for AM (acknowledge mode).
     */
    public val transmitMode: kotlin.Int? = builder.transmitMode

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

    override fun toString(): kotlin.String = buildString {
        append("DownlinkQueueMessage(")
        append("loRaWan=$loRaWan,")
        append("messageId=$messageId,")
        append("receivedAt=$receivedAt,")
        append("transmitMode=$transmitMode")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = loRaWan?.hashCode() ?: 0
        result = 31 * result + (messageId?.hashCode() ?: 0)
        result = 31 * result + (receivedAt?.hashCode() ?: 0)
        result = 31 * result + (transmitMode ?: 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 DownlinkQueueMessage

        if (loRaWan != other.loRaWan) return false
        if (messageId != other.messageId) return false
        if (receivedAt != other.receivedAt) return false
        if (transmitMode != other.transmitMode) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * LoRaWAN router info.
         */
        public var loRaWan: aws.sdk.kotlin.services.iotwireless.model.LoRaWanSendDataToDevice? = null
        /**
         * The message ID assigned by IoT Wireless to each downlink message, which helps identify the message.
         */
        public var messageId: kotlin.String? = null
        /**
         * The time at which Iot Wireless received the downlink message.
         */
        public var receivedAt: kotlin.String? = null
        /**
         * The transmit mode to use for sending data to the wireless device. This can be `0` for UM (unacknowledge mode) or `1` for AM (acknowledge mode).
         */
        public var transmitMode: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.DownlinkQueueMessage) : this() {
            this.loRaWan = x.loRaWan
            this.messageId = x.messageId
            this.receivedAt = x.receivedAt
            this.transmitMode = x.transmitMode
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy