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

commonMain.aws.sdk.kotlin.services.iotwireless.model.LoRaWanUpdateDevice.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

/**
 * LoRaWAN object for update functions.
 */
public class LoRaWanUpdateDevice private constructor(builder: Builder) {
    /**
     * ABP device object for update APIs for v1.0.x
     */
    public val abpV10X: aws.sdk.kotlin.services.iotwireless.model.UpdateAbpV10X? = builder.abpV10X
    /**
     * ABP device object for update APIs for v1.1
     */
    public val abpV11: aws.sdk.kotlin.services.iotwireless.model.UpdateAbpV11? = builder.abpV11
    /**
     * The ID of the device profile for the wireless device.
     */
    public val deviceProfileId: kotlin.String? = builder.deviceProfileId
    /**
     * FPorts object for the positioning information of the device.
     */
    public val fPorts: aws.sdk.kotlin.services.iotwireless.model.UpdateFPorts? = builder.fPorts
    /**
     * The ID of the service profile.
     */
    public val serviceProfileId: kotlin.String? = builder.serviceProfileId

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

    override fun toString(): kotlin.String = buildString {
        append("LoRaWanUpdateDevice(")
        append("abpV10X=$abpV10X,")
        append("abpV11=$abpV11,")
        append("deviceProfileId=$deviceProfileId,")
        append("fPorts=$fPorts,")
        append("serviceProfileId=$serviceProfileId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = abpV10X?.hashCode() ?: 0
        result = 31 * result + (abpV11?.hashCode() ?: 0)
        result = 31 * result + (deviceProfileId?.hashCode() ?: 0)
        result = 31 * result + (fPorts?.hashCode() ?: 0)
        result = 31 * result + (serviceProfileId?.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 LoRaWanUpdateDevice

        if (abpV10X != other.abpV10X) return false
        if (abpV11 != other.abpV11) return false
        if (deviceProfileId != other.deviceProfileId) return false
        if (fPorts != other.fPorts) return false
        if (serviceProfileId != other.serviceProfileId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * ABP device object for update APIs for v1.0.x
         */
        public var abpV10X: aws.sdk.kotlin.services.iotwireless.model.UpdateAbpV10X? = null
        /**
         * ABP device object for update APIs for v1.1
         */
        public var abpV11: aws.sdk.kotlin.services.iotwireless.model.UpdateAbpV11? = null
        /**
         * The ID of the device profile for the wireless device.
         */
        public var deviceProfileId: kotlin.String? = null
        /**
         * FPorts object for the positioning information of the device.
         */
        public var fPorts: aws.sdk.kotlin.services.iotwireless.model.UpdateFPorts? = null
        /**
         * The ID of the service profile.
         */
        public var serviceProfileId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.LoRaWanUpdateDevice) : this() {
            this.abpV10X = x.abpV10X
            this.abpV11 = x.abpV11
            this.deviceProfileId = x.deviceProfileId
            this.fPorts = x.fPorts
            this.serviceProfileId = x.serviceProfileId
        }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy