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

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

/**
 * Wi-Fi access point.
 */
public class WiFiAccessPoint private constructor(builder: Builder) {
    /**
     * Wi-Fi MAC Address.
     */
    public val macAddress: kotlin.String = requireNotNull(builder.macAddress) { "A non-null value must be provided for macAddress" }
    /**
     * Received signal strength (dBm) of the WLAN measurement data.
     */
    public val rss: kotlin.Int = requireNotNull(builder.rss) { "A non-null value must be provided for rss" }

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

    override fun toString(): kotlin.String = buildString {
        append("WiFiAccessPoint(")
        append("macAddress=$macAddress,")
        append("rss=$rss")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = macAddress.hashCode()
        result = 31 * result + (rss)
        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 WiFiAccessPoint

        if (macAddress != other.macAddress) return false
        if (rss != other.rss) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Wi-Fi MAC Address.
         */
        public var macAddress: kotlin.String? = null
        /**
         * Received signal strength (dBm) of the WLAN measurement data.
         */
        public var rss: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.WiFiAccessPoint) : this() {
            this.macAddress = x.macAddress
            this.rss = x.rss
        }

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

        internal fun correctErrors(): Builder {
            if (macAddress == null) macAddress = ""
            if (rss == null) rss = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy