commonMain.aws.sdk.kotlin.services.iotwireless.model.GatewayListItem.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotwireless-jvm Show documentation
Show all versions of iotwireless-jvm Show documentation
The AWS SDK for Kotlin client for IoT Wireless
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotwireless.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Gateway list item object that specifies the frequency and list of gateways for which the downlink message should be sent.
*/
public class GatewayListItem private constructor(builder: Builder) {
/**
* The frequency to use for the gateways when sending a downlink message to the wireless device.
*/
public val downlinkFrequency: kotlin.Int = requireNotNull(builder.downlinkFrequency) { "A non-null value must be provided for downlinkFrequency" }
/**
* The ID of the wireless gateways that you want to add to the list of gateways when sending downlink messages.
*/
public val gatewayId: kotlin.String = requireNotNull(builder.gatewayId) { "A non-null value must be provided for gatewayId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotwireless.model.GatewayListItem = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GatewayListItem(")
append("downlinkFrequency=$downlinkFrequency,")
append("gatewayId=$gatewayId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = downlinkFrequency
result = 31 * result + (gatewayId.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 GatewayListItem
if (downlinkFrequency != other.downlinkFrequency) return false
if (gatewayId != other.gatewayId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotwireless.model.GatewayListItem = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The frequency to use for the gateways when sending a downlink message to the wireless device.
*/
public var downlinkFrequency: kotlin.Int? = null
/**
* The ID of the wireless gateways that you want to add to the list of gateways when sending downlink messages.
*/
public var gatewayId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.GatewayListItem) : this() {
this.downlinkFrequency = x.downlinkFrequency
this.gatewayId = x.gatewayId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotwireless.model.GatewayListItem = GatewayListItem(this)
internal fun correctErrors(): Builder {
if (downlinkFrequency == null) downlinkFrequency = 0
if (gatewayId == null) gatewayId = ""
return this
}
}
}