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

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

There is a newer version: 1.3.34
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

/**
 * GSM object.
 */
public class GsmObj private constructor(builder: Builder) {
    /**
     * GERAN (GSM EDGE Radio Access Network) Cell Global Identifier.
     */
    public val geranCid: kotlin.Int = requireNotNull(builder.geranCid) { "A non-null value must be provided for geranCid" }
    /**
     * GSM local identification (local ID) information.
     */
    public val gsmLocalId: aws.sdk.kotlin.services.iotwireless.model.GsmLocalId? = builder.gsmLocalId
    /**
     * GSM object for network measurement reports.
     */
    public val gsmNmr: List? = builder.gsmNmr
    /**
     * Timing advance value, which corresponds to the length of time a signal takes to reach the base station from a mobile phone.
     */
    public val gsmTimingAdvance: kotlin.Int? = builder.gsmTimingAdvance
    /**
     * Location area code.
     */
    public val lac: kotlin.Int = requireNotNull(builder.lac) { "A non-null value must be provided for lac" }
    /**
     * Mobile Country Code.
     */
    public val mcc: kotlin.Int = requireNotNull(builder.mcc) { "A non-null value must be provided for mcc" }
    /**
     * Mobile Network Code.
     */
    public val mnc: kotlin.Int = requireNotNull(builder.mnc) { "A non-null value must be provided for mnc" }
    /**
     * Rx level, which is the received signal power, measured in dBm (decibel-milliwatts).
     */
    public val rxLevel: kotlin.Int? = builder.rxLevel

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

    override fun toString(): kotlin.String = buildString {
        append("GsmObj(")
        append("geranCid=$geranCid,")
        append("gsmLocalId=$gsmLocalId,")
        append("gsmNmr=$gsmNmr,")
        append("gsmTimingAdvance=$gsmTimingAdvance,")
        append("lac=$lac,")
        append("mcc=$mcc,")
        append("mnc=$mnc,")
        append("rxLevel=$rxLevel")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = geranCid
        result = 31 * result + (gsmLocalId?.hashCode() ?: 0)
        result = 31 * result + (gsmNmr?.hashCode() ?: 0)
        result = 31 * result + (gsmTimingAdvance ?: 0)
        result = 31 * result + (lac)
        result = 31 * result + (mcc)
        result = 31 * result + (mnc)
        result = 31 * result + (rxLevel ?: 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 GsmObj

        if (geranCid != other.geranCid) return false
        if (gsmLocalId != other.gsmLocalId) return false
        if (gsmNmr != other.gsmNmr) return false
        if (gsmTimingAdvance != other.gsmTimingAdvance) return false
        if (lac != other.lac) return false
        if (mcc != other.mcc) return false
        if (mnc != other.mnc) return false
        if (rxLevel != other.rxLevel) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * GERAN (GSM EDGE Radio Access Network) Cell Global Identifier.
         */
        public var geranCid: kotlin.Int? = null
        /**
         * GSM local identification (local ID) information.
         */
        public var gsmLocalId: aws.sdk.kotlin.services.iotwireless.model.GsmLocalId? = null
        /**
         * GSM object for network measurement reports.
         */
        public var gsmNmr: List? = null
        /**
         * Timing advance value, which corresponds to the length of time a signal takes to reach the base station from a mobile phone.
         */
        public var gsmTimingAdvance: kotlin.Int? = null
        /**
         * Location area code.
         */
        public var lac: kotlin.Int? = null
        /**
         * Mobile Country Code.
         */
        public var mcc: kotlin.Int? = null
        /**
         * Mobile Network Code.
         */
        public var mnc: kotlin.Int? = null
        /**
         * Rx level, which is the received signal power, measured in dBm (decibel-milliwatts).
         */
        public var rxLevel: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.GsmObj) : this() {
            this.geranCid = x.geranCid
            this.gsmLocalId = x.gsmLocalId
            this.gsmNmr = x.gsmNmr
            this.gsmTimingAdvance = x.gsmTimingAdvance
            this.lac = x.lac
            this.mcc = x.mcc
            this.mnc = x.mnc
            this.rxLevel = x.rxLevel
        }

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

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

        internal fun correctErrors(): Builder {
            if (geranCid == null) geranCid = 0
            if (lac == null) lac = 0
            if (mcc == null) mcc = 0
            if (mnc == null) mnc = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy