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

commonMain.aws.sdk.kotlin.services.iotwireless.model.LoRaWanDevice.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 create functions.
 */
public class LoRaWanDevice private constructor(builder: Builder) {
    /**
     * LoRaWAN object for create APIs
     */
    public val abpV10X: aws.sdk.kotlin.services.iotwireless.model.AbpV10X? = builder.abpV10X
    /**
     * ABP device object for create APIs for v1.1
     */
    public val abpV11: aws.sdk.kotlin.services.iotwireless.model.AbpV11? = builder.abpV11
    /**
     * The DevEUI value.
     */
    public val devEui: kotlin.String? = builder.devEui
    /**
     * The ID of the device profile for the new wireless device.
     */
    public val deviceProfileId: kotlin.String? = builder.deviceProfileId
    /**
     * List of FPort assigned for different LoRaWAN application packages to use
     */
    public val fPorts: aws.sdk.kotlin.services.iotwireless.model.FPorts? = builder.fPorts
    /**
     * OTAA device object for create APIs for v1.0.x
     */
    public val otaaV10X: aws.sdk.kotlin.services.iotwireless.model.OtaaV10X? = builder.otaaV10X
    /**
     * OTAA device object for v1.1 for create APIs
     */
    public val otaaV11: aws.sdk.kotlin.services.iotwireless.model.OtaaV11? = builder.otaaV11
    /**
     * 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.LoRaWanDevice = Builder().apply(block).build()
    }

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

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

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * LoRaWAN object for create APIs
         */
        public var abpV10X: aws.sdk.kotlin.services.iotwireless.model.AbpV10X? = null
        /**
         * ABP device object for create APIs for v1.1
         */
        public var abpV11: aws.sdk.kotlin.services.iotwireless.model.AbpV11? = null
        /**
         * The DevEUI value.
         */
        public var devEui: kotlin.String? = null
        /**
         * The ID of the device profile for the new wireless device.
         */
        public var deviceProfileId: kotlin.String? = null
        /**
         * List of FPort assigned for different LoRaWAN application packages to use
         */
        public var fPorts: aws.sdk.kotlin.services.iotwireless.model.FPorts? = null
        /**
         * OTAA device object for create APIs for v1.0.x
         */
        public var otaaV10X: aws.sdk.kotlin.services.iotwireless.model.OtaaV10X? = null
        /**
         * OTAA device object for v1.1 for create APIs
         */
        public var otaaV11: aws.sdk.kotlin.services.iotwireless.model.OtaaV11? = 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.LoRaWanDevice) : this() {
            this.abpV10X = x.abpV10X
            this.abpV11 = x.abpV11
            this.devEui = x.devEui
            this.deviceProfileId = x.deviceProfileId
            this.fPorts = x.fPorts
            this.otaaV10X = x.otaaV10X
            this.otaaV11 = x.otaaV11
            this.serviceProfileId = x.serviceProfileId
        }

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy