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

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

/**
 * IP address used for resolving device location.
 */
public class Ip private constructor(builder: Builder) {
    /**
     * IP address information.
     */
    public val ipAddress: kotlin.String = requireNotNull(builder.ipAddress) { "A non-null value must be provided for ipAddress" }

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

    override fun toString(): kotlin.String = buildString {
        append("Ip(")
        append("ipAddress=$ipAddress")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ipAddress.hashCode()
        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 Ip

        if (ipAddress != other.ipAddress) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * IP address information.
         */
        public var ipAddress: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.Ip) : this() {
            this.ipAddress = x.ipAddress
        }

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

        internal fun correctErrors(): Builder {
            if (ipAddress == null) ipAddress = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy