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

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

/**
 * LTE object for network measurement reports.
 */
public class LteNmrObj private constructor(builder: Builder) {
    /**
     * E-UTRA (Evolved universal terrestrial Radio Access) absolute radio frequency channel Number (EARFCN).
     */
    public val earfcn: kotlin.Int = requireNotNull(builder.earfcn) { "A non-null value must be provided for earfcn" }
    /**
     * E-UTRAN (Evolved Universal Terrestrial Radio Access Network) cell global identifier (EUTRANCID).
     */
    public val eutranCid: kotlin.Int = requireNotNull(builder.eutranCid) { "A non-null value must be provided for eutranCid" }
    /**
     * Physical cell ID.
     */
    public val pci: kotlin.Int = requireNotNull(builder.pci) { "A non-null value must be provided for pci" }
    /**
     * Signal power of the reference signal received, measured in dBm (decibel-milliwatts).
     */
    public val rsrp: kotlin.Int? = builder.rsrp
    /**
     * Signal quality of the reference Signal received, measured in decibels (dB).
     */
    public val rsrq: kotlin.Float? = builder.rsrq

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

    override fun toString(): kotlin.String = buildString {
        append("LteNmrObj(")
        append("earfcn=$earfcn,")
        append("eutranCid=$eutranCid,")
        append("pci=$pci,")
        append("rsrp=$rsrp,")
        append("rsrq=$rsrq")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = earfcn
        result = 31 * result + (eutranCid)
        result = 31 * result + (pci)
        result = 31 * result + (rsrp ?: 0)
        result = 31 * result + (rsrq?.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 LteNmrObj

        if (earfcn != other.earfcn) return false
        if (eutranCid != other.eutranCid) return false
        if (pci != other.pci) return false
        if (rsrp != other.rsrp) return false
        if (!(rsrq?.equals(other.rsrq) ?: (other.rsrq == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * E-UTRA (Evolved universal terrestrial Radio Access) absolute radio frequency channel Number (EARFCN).
         */
        public var earfcn: kotlin.Int? = null
        /**
         * E-UTRAN (Evolved Universal Terrestrial Radio Access Network) cell global identifier (EUTRANCID).
         */
        public var eutranCid: kotlin.Int? = null
        /**
         * Physical cell ID.
         */
        public var pci: kotlin.Int? = null
        /**
         * Signal power of the reference signal received, measured in dBm (decibel-milliwatts).
         */
        public var rsrp: kotlin.Int? = null
        /**
         * Signal quality of the reference Signal received, measured in decibels (dB).
         */
        public var rsrq: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.LteNmrObj) : this() {
            this.earfcn = x.earfcn
            this.eutranCid = x.eutranCid
            this.pci = x.pci
            this.rsrp = x.rsrp
            this.rsrq = x.rsrq
        }

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

        internal fun correctErrors(): Builder {
            if (earfcn == null) earfcn = 0
            if (eutranCid == null) eutranCid = 0
            if (pci == null) pci = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy